System of ODEs with independent input

1 次查看(过去 30 天)
Andres
Andres 2012-3-21
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 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by