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