the results from one timestep feed into the subsequent timestep?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi,
I have the following equaiton:
dCs(t)=(I*Ea/Vd)-(Ke*Cs(t));
This is a single compartment toxicological model. I want to generate what the dCs would be at 6month timesteps for 50 years. However the results are additave/compounding with time.
So for example:
at (t)=1, Cs(t)=0, and dCs(t) ends up being 12;
at (t)=2, Cs(t)=12...the result from the first timestep, and dCs(t) ends up being 23;
This pattern continues until 100 time steps have passed. All the other variable in the equation are fixed. How would I code this in a way where the results from one timestep feed into the subsequent timestep?
Many thanks for any and all help!
댓글 수: 0
답변 (1개)
Chaitanya Mallela
2021년 2월 2일
You can implement this equation inside a MATLAB function block in Simulink with dCs(t) output given as a feedback input to the MATLAB function block using a time step delay.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!