**Case I: Square-wave x _{1}(t), 50% duty cycle**

f_{0}=500 Hz

T_{o}=1/500=0.002s=2 ms

Mathematically, the square-wave can be expressed for a single period as

Therefore the trigonometric Fourier series coefficients of x_{1}(t) are

Case II: Square-wave x_{2} (t), 25% duty cycle

Mathematically, the square-wave x_{2} (t) can be expressed for a single period as

Sinusoids from -8 to -1;

clear clc f_0= 500; % fundamental frequency t= -0.001:0.00001:0.006; %time axis Z_50= zeros(1,length(t)); % container for 50% duty cycle waveform Z_25= zeros(1,length(t)); % container for 25% duty cycle waveform n=1:16; n1=sin(pi.*n./2); d1=(pi.*n./2); n2=sin(pi.*n./4); d2=((pi).*n./4); a_50=[n1./d1]; %fourier coefficients for 50% duty cycle a_25=[0.5*(n2./d2)]; %fourier coefficients for % duty cycle for k=1:length(n) wa=1*cos(2*pi*(k)*f_0*t); Z_50=Z_50+ a_50(k)*wa; Z_25=Z_25+ a_25(k)*wa; end soundsc(Z_50) figure (1) plot(t,Z_50) hold on grid on axis tight xlabel('time') ylabel('Amplitude') title('Square-wave with 50% duty cycle'); figure(2) plot(t,Z_25) grid on axis tight xlabel('time') ylabel('Amplitude'); title('Square-wave with 25% duty cycle');

Our motto is deliver assignment on Time. Our Expert writers deliver quality assignments to the students.

Get reliable and unique assignments by using our 100% plagiarism-free.

Get connected 24*7 with our Live Chat support executives to receive instant solutions for your assignment.

Get Help with all the subjects like: Programming, Accounting, Finance, Engineering, Law and Marketing.

Get premium service at a pocket-friendly rate at AssignmentHippo

- Assignment Writing Guide
- Essay Writing Guide
- Dissertation Writing Guide
- Research Paper Writing Guide

- Accounts
- Computer Science
- Economics
- Engineering

Tap to ChatGet instant assignment help