% Matlab diary from cs110a class #1, Jan 3 2005. % % This is what I typed in class. % % Type it into Matlab yourself to % reproduce the output I showed. help help ncm doc a = 3; a b = 2+5 sqrt(b) ans^2 A = [1 2 ; 3 4] b = [ 1 2] b = [ 1; 2] A * b figure(1) fern help fern edit fern A1 = [ .85 .04; -.04 .85]; b1 = [0; 1.6]; A1 b1 format short A1 b1 x = [.5; .5]; x whos finitefern(10^5) hold on axis on plot(x(1),x(2),'ro') A1 b1 x = A1*x + b1 plot(x(1),x(2),'ro') x = A1*x + b1 plot(x(1),x(2),'ro') x = A1*x + b1 plot(x(1),x(2),'ro') x = A1*x + b1 plot(x(1),x(2),'ro') x = A1*x + b1 plot(x(1),x(2),'ro') x = A1*x + b1 A2 = [ .20 -.26; .23 .22]; b2 = [0; 1.6]; A2 b2 y = A2*x + b2 plot(y(1),y(2),'bo') x = A1*y + b1 plot(x(1),x(2),'ro') x = A1*x + b1 plot(x(1),x(2),'ro') x = A1*x + b1 plot(x(1),x(2),'ro') x = A1*x + b1 plot(x(1),x(2),'ro')