Fourier Series of Rectified Cosine Function

5 Ansichten (letzte 30 Tage)
Salik Mallick
Salik Mallick am 11 Okt. 2020
Kommentiert: Star Strider am 11 Okt. 2020
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)

Antworten (1)

Star Strider
Star Strider am 11 Okt. 2020
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 Kommentare
Salik Mallick
Salik Mallick am 11 Okt. 2020
Thanks Mr. Strider.
How do I plot the full wave to determine the period for the below function?
%% Problem 17.1_e
display('Problem 17.1_e')
% Evaluate each of the following functions and see if it
% is periodic. If periodic, find its period.
syms t
D = deg2rad(10);
D1 = rad2deg(D);
E = deg2rad(50);
E1 = rad2deg(E);
z = 4.2*sin(0.4*pi*t + D1) + 0.8*sin(0.6*pi*t + E1)
figure
ezplot(z,[-pi/2,pi/2]), grid on
Star Strider
Star Strider am 11 Okt. 2020
Simply expand the limits:
ezplot(z,[-5*pi,5*pi])
Since this is obviously homework, I leave the rest to you.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by