Code covered by the BSD License  

Highlights from
Using Numerical Computing with MATLAB in the Classroom

from Using Numerical Computing with MATLAB in the Classroom by Cleve Moler
M-files used in the webinar held on April 27, 2004.

goldrect.m
%GOLDRECT  Golden Rectangle
%   GOLDRECT plots the golden rectangle
phi = (1+sqrt(5))/2;
x = [0 phi phi 0 0];
y = [0 0 1 1 0];
u = [1 1];
v = [0 1];
plot(x,y,'b',u,v,'b--')
text(phi/2,1.05,'\phi')
text((1+phi)/2,-.05,'\phi - 1')
text(-.05,.5,'1')
text(.5,-.05,'1')
axis equal
axis off
set(gcf,'color','white')

Contact us at files@mathworks.com