Hi Friends
I want to plot variables (b,u) that are in function "step" .
function main
[t,v]=ode45('step',[0 20],0,[]);
plot(t,v)
function dv=step(t,v)
c1=1;
if t<10
u=1;
else
u=-1;
end
dv=c1*u-2*v;
b=dv/2;
but these variables are unknown in function "main".
thanks.