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: how should i give feedback in matlab ?
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

Posts: 23
Registered: 1/15/13
how should i give feedback in matlab ?
Posted: Feb 11, 2013 4:26 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello, I am doing simulation with adaptive hopf oscillator. I want to give negative feedback from output to input side. how should i give this in matlab? The follwoing figure shows the system.

<< >>

my code is


oscillator function


function dz = myeqd(t,y,ti,xx)

dz = zeros(3,1);

mu = 0.3;

r= sqrt(y(1)^2 + y(2)^2);


K2 = 500;



dz(1)= (mu - r^2)*y(1) - y(3)*y(2) +K1*F;

dz(2) = (mu - r^2)*y(2) + y(3)*y(1);

dz(3) = (-K1*F) * (y(2)/sqrt(y(1)^2 + y(2)^2));


dz(4)= (mu - r^2)*y(4) - y(6)*y(5) +K2*F;

dz(5) = (mu- r^2)*y(5) + y(6)*y(4);

dz(6) = (-K2*F) * (y(5)/sqrt(y(4)^2 + y(5)^2));


mian code


time = 0:0.001:20;

xx = chirp(time,100,10,400);


[T,Y]=ode45(@(t,y) myeqd(t,y,ti,xx),time,[5;5;90]);

e = Y(:,3) + Y(:,6);

plot (T,e);


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.