From: Durga Lal Shrestha on 21 Dec 2009 11:09 Dear all I am very new to Simulink. I am trying to build a Simulink for rainfall runoff model. The following is the example of one of the submodel to be built. FC=150; % Constant parameter Beta = 1.2; % Constant parameter nTime = 365; % Number of time steps %P = rand(nTime,1); % input to the system load inputP % loading input P of the system Sm = zeros(nTime,1); % Soil moisture, state variable R = zeros(nTime,1); % Output from the system (to be simulated) Sm(1) = 100; % Initial state of the soil moisture for t=1:nTime R(t)=P(t).*((Sm(t)/FC)^Beta); % R(t) is output from the system Sm(t+1)=Sm(t)+P(t)-R(t); % Update of the state end I am sure that this can be done very easily in simulink. I am wondering if somebody can help me to build my first simulink model. Thank you very much in advance. Durga
|
Pages: 1 Prev: what definition of an object perimeter Next: Problem with UDP Send/Receive & xPC Target |