How can I plot the fast Fourier transform of a given step response
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How can I plot the fast Fourier transform of a given step response as shwon in the atatched code & picture
And here is my code
clear; clc;close all;
s= tf('s');
num=1;
den=s*(s/10+1);
G= num/den;
H=1;
K2=sqrt(10); %K2
G2=G*K2;
closed_system2=feedback(G2,H);
step(closed_system2,H,'r');
hold on
K3=10; %K3
G3=G*K3;
closed_system3=feedback(G3,H);
step(closed_system3,H,'b');
grid on
title('Response to a refrence step input');
legend('step input @k=10^0.5','step input @k=10')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/387703/image.png)
0 Kommentare
Antworten (1)
Milan Padhiyar
am 29 Okt. 2020
Hello,
To plot a fast Fourier transform of the step response, first, you need to store the signal values.
Please find below command to store the output from the “step” command,
% y is the step response signal array and tOut represent the time array
[y,tOut] = step(sys)
Please find the following documents that show how to use “fft” command to find the fast Fourier transform and how to plot that.
I hope this help you to resolve your query.
Thanks
0 Kommentare
Siehe auch
Kategorien
Mehr zu Discrete Fourier and Cosine Transforms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!