Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Trying to plot fft,,Please help

조회 수: 2 (최근 30일)
Avan Al-Saffar
Avan Al-Saffar 2014년 8월 15일
마감: MATLAB Answer Bot 2021년 8월 20일
My code is :
function RunOsciliation5814
% Solving and ploting the Logistic model with an extra forcing parameter
% dxdt=N0*x*sin(omega*t)*(1-x/K);
N0=2; % The value of the growth rate x0=.1; % The initial condition omega=.5; % The value of osillation parameter t0=0; % The initial value of the time vector tf=200; % The final value in the time vector tspan=t0:tf; % Time vector K=10; % Carrying capacity
% Using ode45 solver to integrate the ODE [t,x]=ode45(@osciliation,[0 200],0.1,[],2,10,.5);
plot(t,x,'*-'); % Plotting Time Vs the population xlabel('t') ylabel('x') title('Time Vs population')
1;

답변 (1개)

Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh 2014년 8월 15일
Hi Avan,
I wish you had provided more information about your problem.
I don't see any sign of fft in your code?! I don't really know what's your intention.
But if you just want to make a fft plot of your data, which apparently is x you may use this code I created to facilitate using fft.
It's very simple to use fft, just take a look inside the file and you'll understand how it's done.
All you need is the data and sampling frequency which is defined a Fs I believe.
I'm hoping this helps but let us know if your problem is not solved.
Good Luck

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by