What is the Fourier Series Coefficient of F=exp(sin(x))?

21 次查看(过去 30 天)
syms x
T=2;
w0=2*pi/T;
f=exp(sin(x));
a0_sym=1/T*int(f,x,0,T);
a0_sym=double(a0_sym);
for n=1:3
a_sym(n)=2/T*int(f*cos(n*w0*x),x,0,T);
b_sym (n)=2/T*int(f*sin(n*w0*x),x,0,T);
a(n)=double(a_sym(n));
b(n)=double(b_sym(n));
end
s = a0_sym + sum(a.*cos((1:3).*w0.*x),2) + sum(b.*sin((1:3) .* w0.*x),2)
s = 
x_num = (-10:0.01:10).';
s_num = double(subs(s,x,x_num));
plot(x_num,s_num)
This is what I did but I'm not getting the desired result...
Please help
  6 个评论
Bethel Eneh
Bethel Eneh 2022-10-20
编辑:Bethel Eneh 2022-10-20
Please can you help me the code for fast fourier transform for F=exp(sin(x))?

请先登录,再进行评论。

回答(1 个)

Bjorn Gustavsson
Bjorn Gustavsson 2022-10-21
编辑:Bjorn Gustavsson 2022-10-21
Might I be so bold as to suggest (physicist writing about calculus here...) that this task ought to have some clever analytical solution method that is easier to do by hand than with help of computer. If you write the exponential as its series expansion:
For the first few terms we can easily rewrite (sin(t))^n into simple sin(n*t) and cos(n*t) terms, and there are trogonometric power-formulas: Trigonometric Power Formulas. If you use those you will get some gnarly expressions for the higher (or arbitrary) powers of (sin t)^k. If you plug those expression into matlab's symbolic tools you might get it to clean them up such that you can recognize the coefficients before the sin(k*2*pi*t) and cos(k*2*pi*t) terms. Those should be your Fourier-coefficients.
HTH

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by