필터 지우기
필터 지우기

Fourier cosine series of a vector

조회 수: 4 (최근 30일)
masoud meskin
masoud meskin 2020년 2월 27일
댓글: masoud meskin 2020년 3월 3일
Hi guys,
I have a vector f1 and i need to find the coefficients of the cosine series of f1 for at least 8 harmonics. Any help would be highly appreciated.
Thank you
Masoud

답변 (1개)

Charan Jadigam
Charan Jadigam 2020년 3월 2일
Hi,
Fourier Cosine Coefficients of the vector can be found using ‘Fit’ function. You can do so by,
>> fit(t1',f1','fourier8')
You can know more about the function and it’s parameters here.
  댓글 수: 1
masoud meskin
masoud meskin 2020년 3월 3일
Hi Charan,
I knew about the "Fit" command and the application. But it gives combination of Sine and Cosine.
Is it going to be different from when i take the fourie cosine directly by codes like this (I found it on the internet):
syms x k n
evalin(symengine,'assume(k,Type::Integer)');
f = x
a = @(k) 2*int(x*cos(k*pi*x),x,0,1);
fourier_cosine_partial_sum = @(x,n) a(0)/2 + ...
symsum(a(k)*cos(k*pi*x),k,1,n);)
Sorry if my question is stupid.
Thank you
Masoud

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Time Series에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by