SetSteadyFlow using handle in MATLAB

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SetSteadyFlow using handle in MATLAB

Anand Kulkarni
Hello,

I am attempting to set steady flow using the controller object in MATLAB.
I have tired all possible ways of passing the flow array but it is beating my intelligence.  

Would any one you mind to have a look at my 5 line code below for that? I am easily able to do it in VBA but I require it in MATLAB environment for further computation
That would be of great help

% Sample code
h=actxserver('RAS501.HECRASCONTROLLER');
infile='C:\Users\akulkarni\SingleRiver_Test1.prj'
h.Project_Open(infile)
runVal=h.Compute_CurrentPlan(0,0);
pause(5);
%Had tried setting Flow as numeric array, cell.. but nothing seems to work!
Flow{1,1}='100';
Flow{2,1}='200';
Flow{3,1}='300';
Flow{4,1}='400';
Flow{5,1}='500';

% Trying to change flow at river station 3000
rivStn=h.Geometry.NodeRS(1,1,1)
for i =1:5
    h.SteadyFlow_SetFlow('river1','reach1',rivStn,Flow{i})
end
S
Reply | Threaded
Open this post in threaded view
|

Re: SetSteadyFlow using handle in MATLAB

S
Could you tell me how to use flow array in Hecras controller? What's the dimension of the array?1 or 2?