Graphics and GUIs with MATLAB.pdf

(13911 KB) Pobierz
Graphics and GUIs
with
MATLAB
T H I R D
E D I T I O N
®
© 2003 by Chapman & Hall/CRC
Graphics and GUIs
with
MATLAB
T H I R D
E D I T I O N
PATRICK MARCHAND
NVIDIA
®
O. THOMAS HOLLAND
The Naval Surface Warfare Center Dahlgren Division
CHAPMAN & HALL/CRC
© 2003 by Chapman & Hall/CRC
A CRC Press Company
Boca Raton London New York Washington, D.C.
Library of Congress Cataloging-in-Publication Data
Marchand, Patrick.
Graphics and GUIs with MATLAB / by Patrick Marchand and O. Thomas Holland.—
3rd ed.
p. cm.
Includes bibliographical references and index.
ISBN 1-58488-320-0
1. Computer graphics. 2. Graphical user interfaces (Computer systems) 3. MATLAB.
I. Holland, O. Thomas. II. Title.
T385 .M3634 2002
006.6¢6—dc21
2002034769
This book contains information obtained from authentic and highly regarded sources. Reprinted material is quoted with
permission, and sources are indicated. A wide variety of references are listed. Reasonable efforts have been made to publish
reliable data and information, but the author and the publisher cannot assume responsibility for the validity of all materials
or for the consequences of their use.
Neither this book nor any part may be reproduced or transmitted in any form or by any means, electronic or mechanical,
including photocopying, microfilming, and recording, or by any information storage or retrieval system, without prior
permission in writing from the publisher.
The consent of CRC Press LLC does not extend to copying for general distribution, for promotion, for creating new works,
or for resale. Specific permission must be obtained in writing from CRC Press LLC for such copying.
Direct all inquiries to CRC Press LLC, 2000 N.W. Corporate Blvd., Boca Raton, Florida 33431.
Trademark Notice:
Product or corporate names may be trademarks or registered trademarks, and are used only for
identification and explanation, without intent to infringe.
Visit the CRC Press Web site at www.crcpress.com
© 2003 by Chapman & Hall/CRC
No claim to original U.S. Government works
International Standard Book Number 1-58488-320-0
Library of Congress Card Number 2002034769
Printed in the United States of America 1 2 3 4 5 6 7 8 9 0
Printed on acid-free paper
© 2003 by Chapman & Hall/CRC
P
R E F AC E
First, I must say that it was quite an honor to be asked to update Patrick’s
seminal work. The original “Graphics and GUIs with MATLAB” was my
introduction to the graphics capabilities of MATLAB , and it was by that book
that I came to a working knowledge of handle graphics. That was way back
with MATLAB 4. Now we are at MATLAB 6 (release 13 is in beta release at the
time of this writing) and MATLAB is more capable, powerful, and user friendly
than ever – a far cry from MATLAB 4!
As with Patrick’s earlier text, this book is intended to present a
comprehensive discussion of the MATLAB graphics system. This third edition
builds on the earlier editions by including the objects and properties new to
MATLAB version 6 and includes the new features of the MATLAB
environment. The organization of this edition is a little different as well. In
teaching MATLAB, I have observed that not everyone wants to be a handle
graphics guru (but they don’t know what they are missing!). Many just want to
be able to plot their data quickly and effectively. MATLAB has addressed this
desire by expanding, for instance, the Figure Window tools, and providing the
more casual user with a tool to modify many figure properties. Consequently,
most of the first half of this book requires little or no knowledge of handle
graphics. The second half thoroughly covers the concept of handle graphics,
and how to create graphical user interfaces.
As with the earlier editions, this book has been written to be useful to
anyone, regardless of their level of expertise with MATLAB. If you know
nothing about MATLAB programming, you can learn much by starting at the
beginning and working through the examples in this book. If you are already
conversant with the MATLAB programming language, you will find a great
deal of information here that is not readily apparent in the MATLAB
documentation. However, I must point out that MATLAB’s documentation has
improved with the product and you are encouraged to delve into the
documentation – but be aware, there is a lot of it!
The folks at the MathWorks continue to improve MATLAB, and its
capabilities have grown well beyond the scope of a single text. New objects
have been created for the latest versions, and the integrated development
environment is more capable and customizable than ever.
MATLAB is a registered trademark of
The MathWorks Inc.
For production information, please contact:
The MathWorks, Inc.
3 Apple Hill Drive
Natick, MA 01760-2098, USA
Phone: (508) 647-7000
Email:
info@mathworks.com
www.mathworks.com
© 2003 by Chapman & Hall/CRC
The code in this text is written with version 6 in mind, so some of it will not
work with earlier versions. The code has been written for clarity, not
necessarily efficiency, and the functions kept as simple as possible so that you
can focus on the graphics aspects. You can download any of the code in this
text by going to
http://www.infinityassociates.com
and following the links for this book. You will also find the solutions to the end
of chapter exercises.
If you are familiar with the earlier editions, you will see some familiar things
here. Good is good and Patrick did such a fine job that much of what he
presented then is still quite applicable and educational. Some things have
been dropped, such as Patrick’s GUI builder. In many respects, modern
MATLAB doesn’t need that any more. There are many new ideas in this
edition, along of course with the new functions, features, and properties that
the latest MATLAB has to offer. Perhaps one of the best aspects of MATLAB is
that The MathWorks has continued to develop the product with very little
compatibility problems. Although there were some major changes from
version 4 to version 5 that led to a few problems for some extreme users, the
transition from 5 to 6 has been smooth and has yielded a version that is more
user friendly and more capable than ever.
So why am I writing this preface instead of Patrick? Patrick is very busy with
new challenges in his career that have taken him a little out of the MATLAB
world, at least as a regular user. My little consulting company, Infinity
Technology Associates, has used his text for some time as a complement to
our teachings, and I use MATLAB extensively for modeling and analysis in my
position as director of a modeling and simulation facility for the Department of
the Navy. Through one turn or another, I was contacted about a follow-up to
Patrick’s second edition. It has been exciting updating and expanding Patrick’s
original work and I know you will find this book a valuable tutorial and
resource as you grow in your knowledge and skill of programming MATLAB
Graphics and GUIs. However, don’t stop with this book. Use MATLAB as
much as you can, read the abundance of documentation that comes with
MATLAB, and by all means experiment. Soon you will wonder how you ever
got your work done without MATLAB.
Best wishes and happy programming!
Thomas Holland
© 2003 by Chapman & Hall/CRC
Zgłoś jeśli naruszono regulamin