how to generate chirp signal ?

2 ビュー (過去 30 日間)
Aniket
Aniket 2013 年 1 月 24 日
How to generate chirp signal for this scenario?
Hello , i have adaptive oscillator matlab code .
****************************
function dz = myeqd(t,y,ti,fi)
dz = zeros(3,1);
mu=0.7;
r= sqrt(y(1)^2 + y(2)^2);
K=2;
%w=40;
F=interp1(ti,fi,t);
dz(1)= (mu - r^2)*y(1) - y(3)*y(2) +K*F;
dz(2) = (mu - r^2)*y(2) + y(3)*y(1);
dz(3) = (-K*F) * (y(2)/sqrt(y(1)^2 + y(2)^2));
**************************************
then call this function
************************************
Tspan= 0:0.01:500; % time vector
fi = cos(10*Tspan)+ 0.1*randn(1,numel(Tspan));
ti=Tspan;
[T,Y]=ode45(@(t,y) myeqd(t,y,ti,fi),Tspan,[1;1;30]);
plot (T,Y(:,3))
****************************
In the above code i am giving fi = cos(10*Tspan)+ 0.1*randn(1,numel(Tspan)) external input signal but instead of this I want to test this code for Chirp signal as an external input and i am not getting how to give chirp signal .
any one can help me
thank you

採用された回答

Sachin Ganjare
Sachin Ganjare 2013 年 1 月 24 日
Use matlab "chirp" function.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by