How to convolve and plot fft of cosine function
Afficher commentaires plus anciens
X1[n]=3*cos((2*pi*3*n)/25); X2[n]=6*cos((2*pi*9*n)/25); X3[n]=9*cos((2*pi*12*n)/25); k=1,2,3 X[n] = summation from k=1 to 3 of (Xk[n])
I need to convolve each Xk[n] with X[n] and find the length of each sequence
Réponses (1)
Ankitha Kollegal Arjun
le 18 Avr 2017
To perform convolution of 2 sequences, the conv() function can be used. To find the length of a sequence, the length() function can be used. Here is an example:
n = 0:10;
x1 = 3*cos((2*pi*3*n)/25);
x2 = 6*cos((2*pi*9*n)/25);
x3 = 9*cos((2*pi*12*n)/25);
x = x1+x2+x3;
conv_x1 = conv(x1,x);
length_conv_x1 = length(conv_x1);
conv_x2 = conv(x2,x);
length_conv_x2 = length(conv_x2);
conv_x3 = conv(x3,x);
length_conv_x3 = length(conv_x3);
FFT of a sequence can be obtained using fft() function.
Catégories
En savoir plus sur Fourier Analysis and Filtering dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!