You are on page 1of 10

1.

)
a.)
>> Fs=8000;
>> t=[0:127]/Fs;
>> y=0.8*sin(2*pi*2000*t);

>>plot(t,y, 'm*-.')

b.)
Syntax:(6000Hz)
>> t=[0:127]/(Fs);
>> y=0.8*sin(2*pi*2000*t);
>> Fs=6000;
>> plot(t,y, 'm*-.')
Syntax:(4050Hz)
>> t=[0:127]/(Fs);
>> y=0.8*sin(2*pi*2000*t);
>> Fs=4050;
>> plot(t,y, 'm*-.')
Syntax:(3900Hz)
>> t=[0:127]/(Fs);
>> y=0.8*sin(2*pi*2000*t);
>> Fs=3900;
>> plot(t,y, 'm*-.')

Is there a change in output waveforms? Explain.


Yes, the sampling frequency of the sinusoid is inversely proportional to the period which
results to a change in wave form.

c.)
>> Fs1c=1000;
>> t1c=[0:(1/Fs1c):0.249]
>> y1c=exp(-t1c/0.05);
>> figure; plot(t1c,y1c, 'm*-.')
d.)
>> length(y);
>> length(y1c);
>> y(1,250)=0;
>> y1d=y.*y1c
>> figure; plot(t1c,y1d, 'm*-.')

Plot and describe the resulting waveform.

As the time increases, the resulting waveform is on exponentially decaying signal and two
waves meet at 0.

2.)
a.)
>> fs2a=8000
>> t2a=[0:299]/(fs2a);
>> y2a=2*sin(2*pi*75*t2a);

>> figure; plot(t2a, y2a, 'm*-.');


b.)
>> fs2b=8000
>> t2b=[0:299]/(fs2b);
>> k=1;y2b1=(1/k)*2*sin(2*pi*75*k*t2b);
>> k=2;y2b2=(1/k)*2*sin(2*pi*75*k*t2b);
>> k=3;y2b3=(1/k)*2*sin(2*pi*75*k*t2b);
>> k=4;y2b4=(1/k)*2*sin(2*pi*75*k*t2b);
>> k=5;y2b5=(1/k)*2*sin(2*pi*75*k*t2b);
>> k=6;y2b6=(1/k)*2*sin(2*pi*75*k*t2b);
>> k=7;y2b7=(1/k)*2*sin(2*pi*75*k*t2b);
>> k=8;y2b8=(1/k)*2*sin(2*pi*75*k*t2b);
>> k=9;y2b9=(1/k)*2*sin(2*pi*75*k*t2b);
>> k=10;y2b10=(1/k)*2*sin(2*pi*75*k*t2b);
>> y2bsum=y2b1+y2b2+y2b3+y2b4+y2b5+y2b6+y2b7+y2b8+y2b9+y2b10;
>> figure; plot(t2b, y2bsum, 'm*-.');
Plot and describe the resulting wave form.
The resulting waveform is like sawtooth.

c.)
>> fs2c=8000;
>> t2c=[0:299]/(fs2c);
>> k=1;y2c1=(1/k)*2*sin(2*pi*75*k*t2c);
>> k=3;y2c2=(1/k)*2*sin(2*pi*75*k*t2c);
>> k=5;y2c3=(1/k)*2*sin(2*pi*75*k*t2c);
>> k=7;y2c4=(1/k)*2*sin(2*pi*75*k*t2c);
>> k=9;y2c5=(1/k)*2*sin(2*pi*75*k*t2c);
>> k=11;y2c6=(1/k)*2*sin(2*pi*75*k*t2c);
>> k=13;y2c7=(1/k)*2*sin(2*pi*75*k*t2c);
>> k=15;y2c8=(1/k)*2*sin(2*pi*75*k*t2c);
>> k=17;y2c9=(1/k)*2*sin(2*pi*75*k*t2c);
>> k=19;y2c10=(1/k)*2*sin(2*pi*75*k*t2c);
>> y2csum = y2c1+y2c2+y2c3+y2c4+y2c5+y2c6+y2c7+y2c8+y2c9+y2c10;

Plot and describe the resulting wave form.


It is a rectangular waveform with distorted ripples on the peaks.

d.)
>> fs2d=8000;
>> t2d=[0:299]/(fs2d);
>> k=1;m=((k-1)/2).^2;y2d1=(((-1).^m)/k.^2)*2*sin(2*pi*75*k*t2d);
>> k=3;m=((k-1)/2).^2;y2d2=(((-1).^m)/k.^2)*2*sin(2*pi*75*k*t2d);
>> k=5;m=((k-1)/2).^2;y2d3=(((-1).^m)/k.^2)*2*sin(2*pi*75*k*t2d);
>> k=7;m=((k-1)/2).^2;y2d4=(((-1).^m)/k.^2)*2*sin(2*pi*75*k*t2d);
>> k=9;m=((k-1)/2).^2;y2d5=(((-1).^m)/k.^2)*2*sin(2*pi*75*k*t2d);
>> k=11;m=((k-1)/2).^2;y2d6=(((-1).^m)/k.^2)*2*sin(2*pi*75*k*t2d);
>> k=13;m=((k-1)/2).^2;y2d7=(((-1).^m)/k.^2)*2*sin(2*pi*75*k*t2d);
>> k=15;m=((k-1)/2).^2;y2d8=(((-1).^m)/k.^2)*2*sin(2*pi*75*k*t2d);
>> k=17;m=((k-1)/2).^2;y2d9=(((-1).^m)/k.^2)*2*sin(2*pi*75*k*t2d);
>> k=19;m=((k-1)/2).^2;y2d10=(((-1).^m)/k.^2)*2*sin(2*pi*75*k*t2d);
>> y2dsum=y2d1+y2d2+y2d3+y2d4+y2d5+y2d6+y2d7+y2d8+y2d9+y2d10;
>> figure; plot(t2d, y2dsum, 'm*-.');

Plot and describe the resulting waveform.


The graph formed was triangular waveforms.

3.)
a.)
>> [x,y]meshgrid(-3*pi:0.1:3*pi);
>> r=sqrt((x.^2)+(y.^2));
>> z=(sin(r))./r;
>> plot3(x,y,z, 'm*-.')
Describe the output waveform.

The output waveform looks like a hat.


b.)
>> contour3(x,y,z,30, 'm*-.')

Copy graph to data sheet. Describe the output waveform.

The output waveform looks like a stadium with a giant Christmas tree in the middle of it.

c.)

(fz) = (z.^5).^(1/8)
Syntax:
>> z3c=cplxgrid(30);
>> x3c=(z3c.^5).^(1/8);
>> cplxmap(z3c,x3c);
Copy graph to data sheet. Describe the output waveform.
The output waveform looks like a colorful wormhole.

(z) = tan^-1(2*z)
Syntax:
>> z3c=cplxgrid(30);
>> x3cii=atan(2*z3c);

>> cplxmap (z3c,x3cii);

Copy graph to data sheet. Describe the output waveform.


The output waveform looks like a melted cheese.

You might also like