plotting Fourier series periodic signal ?
1 view (last 30 days)
Show older comments
Faisal Al-Wazir
on 28 Apr 2022
Commented: Faisal Al-Wazir
on 4 May 2022
i have this homewrok which asked me to plot a fourier series
the issues:
- i don't know how to change it from unit step function
- i don't know how to plot it to the 2nd period

0 Comments
Accepted Answer
Chandra
on 2 May 2022
Edited: Chandra
on 4 May 2022
Hi,
For plotting x(t) use stem function
T1 = 2;
T0 = 8;
x1 = ones(1,2*T1); % 1 i.e., 0<t<T1
x2 = -1*ones(1,T0/2-T1); %-1 i.e., T1<t<T0/2
x = [x2 x1 x2];
%x = [x x x];
%t = linspace(-12,12,length(x));
t = linspace(-4,4,length(x)); %comment this line if 6 and 7 lines are uncommented
stem(t,x);
axis([-15 15,-2 2]);
for fourier series of x, refer to this link
7 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!