- #1
btbam91
- 91
- 0
Hey guys, I am extremely inexperienced with MATLAB and I"m struggling putting this ode into matlab.
y' = -a*y+u(t-1)-u(t-3)
I know that for y=u(t-1), you type:
if t<1
y=0;
else
y=1;
end
and for y=u(t-3):
if t<3
y=0;
else
y=1;
But I'm confused as to how you'd combine all of the above into a correction function m file!
Thanks!
y' = -a*y+u(t-1)-u(t-3)
I know that for y=u(t-1), you type:
if t<1
y=0;
else
y=1;
end
and for y=u(t-3):
if t<3
y=0;
else
y=1;
But I'm confused as to how you'd combine all of the above into a correction function m file!
Thanks!