Fourier Series of Rectified Cosine Function
4 ビュー (過去 30 日間)
古いコメントを表示
Why isn't this script running?
%% Problem 17.9
display('Problem 17.9')
% Determine the Fourier coefficients an and bn of the
% first three harmonic terms of the rectified cosine
% wave
syms n t
T = 8;
Wo=2*pi/T;
n = 1:3;
an = (2/T)*[int(2.5*cos(n*Wo*t)*cos(n*Wo*t),-2,2)]
AN_numeric = double(an)
0 件のコメント
回答 (1 件)
Star Strider
2020 年 10 月 11 日
Try this:
syms n t
T = 8;
Wo=2*pi/T;
nv = (1:3);
an = (2/T)*int(2.5*cos(n*Wo*t)*cos(n*Wo*t),t,-2,2)
AN_numeric = double(subs(an,{n},{nv}))
.
2 件のコメント
Star Strider
2020 年 10 月 11 日
Simply expand the limits:
ezplot(z,[-5*pi,5*pi])
Since this is obviously homework, I leave the rest to you.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!