Welcome to the RAS Solution Forums HECRAS Controller SetSteadyFlow using handle in MATLAB

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8217
    Anonymous
    Guest

    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

    #13593
    Anonymous
    Guest

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.