The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Forced Van der Pol HELP
Replies: 1   Last Post: Feb 20, 2013 10:46 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 16
Registered: 2/20/13
Forced Van der Pol HELP
Posted: Feb 20, 2013 6:44 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi i've looked for help with this problem all over but found little to no help.

I'm simply trying to model a forced Van der Pol oscillator (ie instead of making diff equation = 0 now make it =cos(wt)). I need to update my function "vdp" 's 't' term as i run the code. I don't see how i can do this (ie i want the t term in the cos function to increment for each execution). Please any help would be greatly appreciated.

My code:
vdp file:

function dydt = vdp(t,y,Mu)
dydt =[y(2);Mu*(1-y(1)^2)*y(2)-y(1)+Mu*(sin(800*pi*t)+sin(900*pi*t))];
% End solvevdp.m

test file:
t = [1:100:1]
Mu= 1000;

ode= @(t,y) vdp(t,y,Mu);
[t,y]=ode23(ode,[0, 3000],[2;0]);

title('van der Pol Equation, \mu = 1000')
axis([0 3000 -3 3])
ylabel('solution y')

Date Subject Author
Read Forced Van der Pol HELP
Read Re: Forced Van der Pol HELP

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.