how to determine the coefficient of Fourier series in matlab code?

3 次查看(过去 30 天)
I have a trigonometric series as above, but I can't figure out how to determine the value of the series coefficients in the matlab code. please help me, thanks.
this is the equation above in the matlab code that I used:
for n = 1:100
term = sin(2*n)/(n^2);
disp([term]')
end

回答(1 个)

David Hill
David Hill 2020-4-22
n=1:1000;
term=sin(2*n)./(n.^2);

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

产品


版本

R2013a

Community Treasure Hunt

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

Start Hunting!

Translated by