System of ODEs with independent input
1 回表示 (過去 30 日間)
古いコメントを表示
Hi everyone
I hope someone can help me with these, seems to be a very simple problem, but I can't find the solution.
I have the following system of ODEs
ds1=kh*(sg*u-s(3))-gh*s(1);
ds2=ad*s(1);
ds3=s(2)+ai*(sg*u-s(3))-gg*s(3);
As you can see, there are 3 variables, but their behavior not only depends on "t" but also on "u" which is the input to the system, an independent variable (in this case, a pulse train). U doesn't have a continous derivative equation, otherwise I would only define it as another variable "s4".
What I've done so far is sending the whole pulse train (for the time span) as an additional parameter and then find the u correspondent to each time using interpolation:
u=interp1(inputsignal(:,1),inputsignal(:,2),t,'pchip');
But this seems inefficient, so I'm sure there must be a better solution. I've looked through all the documentation on ODEs, and none seems to give a solution to this kind of problems.
Thanks very much if anyone can help me.
0 件のコメント
回答 (0 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!