필터 지우기
필터 지우기

How to convolve and plot fft of cosine function

조회 수: 1 (최근 30일)
Dalia Lezzar
Dalia Lezzar 2017년 4월 13일
답변: Ankitha Kollegal Arjun 2017년 4월 18일
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
Ankitha Kollegal Arjun 2017년 4월 18일
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