calculating fourier series for the given functions and drawing the curve?

1 次查看(过去 30 天)
hey guys, one of my friends has just given me a question.I wrote the code for it but don't know how to draw the chart or curve for that,would you please help me out...??thanks
here's the code: clc syms x f=exp(-abs(x)); N=15; a_0=(1/pi)*int(f*cos(0*x),-pi,pi) for n=1:N a_n(n)=(1/pi)*int(f*cos(n*x),-pi,pi); b_n(n)=(1/pi)*int(f*sin(n*x),-pi,pi); end a_n b_n f_new=a_0/2; for n=1:N f_new=f_new+a_n(n)*cos(n*x)+b_n(n)*sin(n*x); end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by