Uploaded by nabaz muhamad

matlab

advertisement
Name: Nabaz Muhamad
Group(A)
Q1
>> f=0.2;
>> t=0:0.1:30;
>> p=sawtooth(2*pi*f*t);
>> plot(t,p)
>> p=4*sawtooth(2*pi*f*t);
>> plot(t,p)
Q2
x=-2*pi:pi/45:2*pi;
>> n=sin(x)/x;
>> plot(x,n)
Q3
x1=-pi:pi/75:pi;
>> h=sin(x1);
>> k=cos(x1);
>> plot(x1,h,'-',x1,k,'+')
>> axis([-4 4 -2 2])
Q4
x2=-pi:pi/50:pi;
>> e=sin(x2);u=cos(x2);o=exp(x2);
>> subplot(2,2,1);plot(e)
>> subplot(2,2,2);plot(u)
>> subplot(2,2,3);plot(o)
Download