See Answer

Add Answer +20 Points

Community Answer

See all the answers with 1 Unlock

Get 4 Free Unlocks by registration

Get 4 Free Unlocks by registration

%%MATLAB CODE FOR PART Aclose allclear allclear variablesclcn=0:10;x1=sin((2*pi/10).*n);x2=cos((2*pi/10).*n);x3=x1+x2;y1=2.*x1;y2=2.*x2;y3=2.*x3;y4=y1+y2;stem(n,x3);hold onstem(n,y3,'-r');hold onstem(n,y1+y2,'-g');hold onstem(n,y4,'-c');if y3==y4disp('output consistent with a linear system')elsedisp('output consistent with a non-linear system')end%%MATLAB code for part b%part 1close allclear allclear variablesclcn=0:10;for i=1:length(n)xx1(i)=0;xx2(i)=1;endxx3=xx1+xx2;yy3=xx3.^2;yy1=xx1.^2;yy2=xx2.^2;yy4=yy1+yy2;stem(n,yy3,'-r');hold onstem(n,yy4,'-c');if yy3==yy4disp('output consistent with a linear system')elsedisp('output consistent with a non-linear system')end%%My choice of data:x1=1:11%%x2=11:21for i=1:length(n)x1(i)=i;x2(i)=i+10;endx3=x1+x2;y1=x1.^2;y2=x2.^2;y3=x3.^2;y4=y1+y2;figurestem(n,y3);hold onstem(n,y4,'-r');if y3==y4disp('output consistent with a linear system')elsedisp('output consistent with a non-linear system')endfi ... See the full answer