disp('Homework sSet no.1') disp('Section 1.1') pause disp('Problem 2') A2=[1 -3 7;2 6 8] pause xx=[-2 7]; y1=xx/3-7/3; y2=-xx/3+4/3; plot(xx,y1,'y-',xx,y2,'r-') rref(A2) pause disp('Problem 18') A18=[2 3 4 3;3 6 -2 1;5 -9 6 1] rref(A18) pause disp('Problem 24') A24=[2 -1 1 -1 3;3 -2 4 -1 4;5 2 -3 -4 0;-1 -1 3 4 2] rref(A24) pause disp('Problem 33') disp('Compare also the in-class exercises for small steps') xx=[0,1,2,-1] yy=[1,2,3,6] hold off a=polyfit(xx,yy,3) xxx=[-1.5:0.25:2.5]; yyy=polyval(a,xxx); plot(xx,yy,'r*',xxx,yyy,'c-') disp('Result displayed in PLOT window - don''t miss it!') pause disp('Problem 50') pause disp('First change variables u=1/(x-y) and v=1/(x+y)') disp('Then the (u,v) solution is:') pause A50=[2 1 3;5 6 4] step1=rref(A50) u=step1(1,3) v=step1(2,3) pasue disp('Then solve a new system for x and y') pause A50a=[u -u 1;v v 1] rref(A50a) pause disp('Section 1.2') pause disp('Problem 2') pause A2=[1 2 -1;0 1 -1;0 0 0] rref(A2) disp('unique solution') pause disp('Problem 8') pause A8=[1 4 0 -2;0 0 1 3;0 0 0 1] disp('inconsistent, no solution') pause disp('Problem 10') A10=[1 2 0 1 -3;0 0 1 2 4] disp('consistent: 2-parameter family of solutions:') disp('x=(-3-t-2s,s,4-2t,t)') pause disp('Problem 14') pause A14=[1 1 1 0;1 -1 1 0;1 1 -1 0] rref(A14) pause disp('Problem 20') pause A20=[1 -7 17;2 3 0;3 -4 17] rref(A20) pause disp('Problem 28') pause disp('MATLAB is not suitable here - better try MAPLE, best use paper!')