How to convolve and plot fft of cosine function

1 次查看(过去 30 天)
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

回答(1 个)

Ankitha Kollegal Arjun
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.

类别

Help CenterFile Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by