ftt of cosine wave
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello everyone,
I have tried to have the fft from a cosine wave. The form of the final function the place where I must have the delta are correct, but the amplitude of the delta is 10.5. The code is the following:
clc
clear all
close all
N=21;
F0=1/N;
n=[0:N-1];
s=cos(2*pi*F0*n);
S=fft(s);
fs=1/210;
Fs=[0:fs:fs*(21-1)];
stem(Fs,abs(S));
Thank you!
5 Kommentare
Walter Roberson
am 27 Mai 2019
Franco Riggio comments to me,
Thank you, the answer was the correct one! But why do you have to normalize it? Do you have to do it everytime you want to plot it? What do I have to do if I have more than one cosine?
Walter Roberson
am 27 Mai 2019
I seem to recall it is an adjustment needed when converting between continuous and the most common implementations for discrete.
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!