An Introduction with Applications
Department of Mechanical Engineering The Ohio State University
An Introduction with Applications
JOHN WILEY & SONS, INC.
EXECUTIVE PUBLISHER ASSOCIATE PUBLISHER ACQUISITIONS EDITOR EDITORIAL ASSISTANT SENIOR PRODUCTION EDITOR COVER DESIGNER
Don Fowley Dan Sayre Michael McDonald RachaelLeblond Ken Santor Michael St. Martine
This book was set in Adobe Framemaker® by the author and printed and bound by Malloy Inc. The cover was printed by Malloy Inc. This book is printed on acid free paper. ∞ Copyright © 2008 John Wiley & Sons, Inc. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means,electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc. 222 Rosewood Drive, Danvers, MA 01923, (978)750-8400, fax (978)646-8600.Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030-5774, (201)748-6011, fax (201)748-6008. To order books or for customer service please, call 1-800-CALL WILEY (225-5945).
ISBN 978-0-470-10877-2 Printed in the United States of America 10 9 8 7 6 5 4 3 2 1
MATLAB® is a very popularlanguage for technical computing used by students, engineers, and scientists in universities, research institutes, and industries all over the world. The software is popular because it is powerful and easy to use. For university freshmen in it can be thought of as the next tool to use after the graphic calculator in high school. This book was written following several years of teaching the software tofreshmen in an introductory engineering course. The objective was to write a book that teaches the software in a friendly, non-intimidating fashion. Therefore, the book is written in simple and direct language. In many places bullets, rather than lengthy text, are used to list facts and details that are related to a specific topic. The book includes numerous sample problems in mathematics, science,and engineering that are similar to problems encountered by new users of MATLAB. This third edition of the book is updated for MATLAB 7.5 (Release 2007b). Other modifications/changes to this edition are: script files are introduced in Chapter 1 (this allows students to use script files for solving problems in Chapters 2 and 3), new coverage of the Workspace Window, the save and load commands,plotting figures with error bars, and instructions for using several Figure Windows at the same time. Chapter 6 was revised to include coverage on anonymous functions, function functions, function handles, subfunctions and nested functions. In addition, the end of chapter problems have been revised. There are many new problems (more than half), and the problems cover a wider range of topics. I wouldlike to thank several of my colleagues at The Ohio State University. Professors Richard Freuler, Mark Walter, and Walter Lampert, and Dr. Mike Parke read sections of the book and suggested modifications. I also appreciate the involvement and support of Professors Robert Gustafson and John Demel and Dr. John Merrill from the First-Year Engineering Program at The Ohio State University. Special thanksgo to Professor Mike Lichtensteiger (OSU), and my daughter Tal Gilat (Marquette University), who carefully reviewed the first edition of the book and provided valuable comments and criticisms. Professor Brian Harper (OSU) has made a significant contribution to the new end of chapter problems in the present edition. I would like to express my appreciation to all those who have reviewed the first...