I would like to program
x(n)={10, 9,1,5,0,8,4} this function to X(ω)
I wanna know magnitude ofㅣX(ω)ㅣrepresented in ω-domain plot
please answer me the code of this program and I will appreciate so much
if you show me the capture or figure of plot .

 Réponse acceptée

Wayne King
Wayne King le 27 Mai 2012
x = [10 9 1 5 0 8 4];
xdft = fft(x);
plot(abs(xdft))
A better example would be something like:
Fs = 1000;
t = 0:1/Fs:1-1/Fs;
x = cos(2*pi*100*t)+randn(size(t));
xdft = fft(x);
freq = 0:Fs/length(x):Fs/2;
xdft = xdft(1:length(x)/2+1);
plot(freq,abs(xdft)), xlabel('Hz');
ylabel('Magnitude');

2 commentaires

bae hye jeong
bae hye jeong le 27 Mai 2012
Thank you very very much
can I get the figure of plot from you?
have some trouble with my matlab
bae hye jeong
bae hye jeong le 27 Mai 2012
and
xlabel('ω')is more proper for me

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by