Generating a unit impulse function

12 visualizzazioni (ultimi 30 giorni)
Mario
Mario il 5 Feb 2013
Hey all,
I have a function which:
function xprime=nagumo(t,x,i);
a=i(1); %CONTROL LOCATION AT WHICH PULSE OCCURS
b=i(2);
xprime=[x(1)-(1/3)*(x(1))^3-x(2)+***INSERT UNIT IMPULSE***;0.08*(x(1)+0.7-0.8*x(2))];
I need to use this nagumo function with ode45 in the form:
[t,x]=ode45(@nagumo,tspan,x0,[],i);
I need the unit impulse to be a signal as a time series with at least two time samples as being 1, and the rest of the samples being zero. Which is basically a rectangular pulse, occuring only once at the t i specify for the duration I specify. The height of the pulse is 1.
Thanks

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by