% Matlab diary from cs110a class #2, Jan 5 2005. % % This is what I typed in class. % % Type it into Matlab yourself to % reproduce the output I showed. ncmgui finitefern(100000) edit fern clf fern clf finitefern(100000) axis on I = eye(2) A1 = [ .85 .04; -.04 .85]; b1 = [0; 1.6]; A1 I - A1 b1 x = (I-A1) \ b x = (I-A1) \ b1 hold on plot(x(1),x(2),'ro') axis( [ -3 5 0 12]) s = [0 4] t = .15 * s / .04 plot(s,t,'b-') s = [ -2 5] t = (1.6 - .04*s)/.15 plot(s,t,'g-') A = randn(8) b = randn(8,1) x = A \ b b A*x A * x - b