%-- 1/20/11 3:17 PM --% A = [ 1 2 3 4 4 5 6 7 7 4 78 5] x = [1 ; 2 ; 4] A*x x = [1 ; 2 ; 4; 4] A*x y = ans A\y A*ans doc backslash doc slash doc \ what S get(gca) linspace(0,1,3) linspace(0,1,5) logspace(0,1,5) i = 1:10 clf dzero = 5; r = 0.15; % Compound interest rate T = 5; % 5 year period m = 60; % 60 months for i = 1:m % let i months elapse tval(i) = i/12; %time in years d(i) = dzero*(1+r*tval(i)/i)^i; %compound i times end % OR i = 1:m; tval = i/12; d = dzero*(1+r*tval./i).^i; tval d ch03 gallery demo edit meshgrid meshgrid(-10:dx:10,1:dsig:5) meshgrid(-10:1:10,1:1:5) X=meshgrid(-10:1:10,1:1:5) [X,SIGMA]=meshgrid(-10:1:10,1:1:5) SIGMA=ones(size(SIGMA)) Z = exp(-(X-mu).^2./(2*SIGMA.^2))./sqrt(2*pi*SIGMA.^2); surf(X,SIGMA,Z) what getplotdata %-- 1/27/11 3:11 PM --% centers e E pi N help erf ls edit qqplot S qqplot(S) edit N1inv qqplot(S) close qqplot(S) clf qqplot(S) hist(Svals(:,end)) R = (Svals(:,2:end)-Svals(:,1:end-1))./Svals(:,1:end-1); plot(cumsum(R.^2,2)) plot(cumsum(R.^2,2)') R = (Svals(:,2:end)-Svals(:,1:end-1))./Svals(:,1:end-1); plot(cumsum(R.^2,2)') R = (Svals(:,2:end)-Svals(:,1:end-1))./Svals(:,1:end-1); plot(cumsum(R.^2,2)') % L=1e4 cd .. cd Week3 sim1 plot(cumsum(abs(R),2)')