ftt of cosine wave

7 Ansichten (letzte 30 Tage)
Franco Riggio
Franco Riggio am 26 Mai 2019
Kommentiert: Walter Roberson am 27 Mai 2019
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
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
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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by