Hi! I have load the library in Matlab apparently rigth. I can open the .inp file and even execute a simulation, but when I execute a function with an output (any ENget...) Matlab broke! (Matlab system Error)
I think the problem could be the way I define the "output variable". I'm defining it as a pointer with the wanted data type using libpointer. If insted such pointer the variable is only defined as a default value, the function ENget... is executed but do no any alteration on the variable default value (being useless).
I would greatly appreciate any help you can give me in working this problem
Following an example code (I've tried with other ENget... functions and their matching data type, without changes) and the Error window:
NodesTotal = libpointer('int32Ptr');
[err] = calllib('epanet2','ENgetcount',0,NodesTotal);%HERE THE PROBLEM APPEAR