CISE Department Tim Davis, Assoc. Prof.
P.O. Box 116120
University of Florida
Gainesville, FL 32611-6120
phone (352) 392-1481, fax (352) 392-1220
email: my last name AT cise.ufl.edu

MATLAB Primer 7th edition

Timothy A. Davis and Kermit Sigmon, 2005. Published by CRC Press. ( buy it at CRC Press ) ( buy it at Amazon.com )


Front and back cover art, generated with MATLAB code from the book.

MATLAB Primer, 7th edition, front cover
MATLAB Primer, 7th edition, back cover
MATLAB Primer, 7th edition
Front cover seashell
Back cover seashell
Book cover

  • Click here for the seashell GUI for generating seashells in MATLAB with a GUI interface.
  • Click here for the seashell.m file, just to generate the seashell.
  • Click here for The MathWorks page for the book
  • Take a look at the Seashell MathWorld article, for another parameterization. The 2nd parameterization stated on the MathWorld article, and used in seashell.m, is actually from von Seggern (see his 1992 book) not Nordstrand.

    Below is the raw MATLAB code that generates the seashells above (more details are in seashell.m) The back cover uses a=-0.5. Cut and paste the following into your MATLAB command window. For a figure that's easier to rotate, use a smaller resolution (change '512' in linspace to 64).

    figure(1) ; clf
    t = linspace(0, 2*pi, 512) ;
    [u,v] = meshgrid(t) ;
    a = -0.2 ; b = .5 ; c = .1 ;
    n = 2 ;
    x = (a*(1-v/(2*pi)) .* (1+cos(u)) + c) .* cos(n*v) ;
    y = (a*(1-v/(2*pi)) .* (1+cos(u)) + c) .* sin(n*v) ;
    z = b*v/(2*pi) + a*(1-v/(2*pi)) .* sin(u) ;
    surf(x,y,z,y)
    shading interp
    axis off
    axis equal
    colormap(hsv(1024))
    material shiny
    lighting gouraud
    lightangle(80, -40)
    lightangle(-90, 60)
    view([-150 10])


    Files referenced in the book
    7th Edition errata
    6th edition