How to convolve and plot fft of cosine function
1 view (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Ankitha Kollegal Arjun
on 18 Apr 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.
0 Comments
See Also
Categories
Find more on Fourier Analysis and Filtering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!