Essential MATLAB for Engineers and Scientists
Sixth Edition
Brian H. Hahn
Daniel T. Valentine
Table of Contents
List of tables
- Tables in Chapter 2
- Tables in Chapter 5
- Tables in Chapter 10
- Tables in Chapter 14
List of figures
- Figures in Chapter 1
- Figures in Chapter 2
- Figures in Chapter 3
- Figures in Chapter 4
- Figures in Chapter 5
- Figures in Chapter 6
- Figures in Chapter 8
- Figures in Chapter 9
- Figures in Chapter 10
- Figures in Chapter 12
- Figures in Chapter 13
- Figures in Chapter 14
- Figures in Chapter 15
- Figures in Chapter 16
- Figures in Chapter 17
Landmarks
Part 1
Essentials
Outline
Part 2
Applications
Outline
Copyright
Academic Press is an imprint of Elsevier
50 Hampshire Street, 5th Floor, Cambridge, MA 02139, United States
525 B Street, Suite 1800, San Diego, CA 92101-4495, United States
The Boulevard, Langford Lane, Kidlington, Oxford OX5 1GB, United Kingdom
125, London Wall, EC2Y, 5AS, United Kingdom
Copyright 2017, 2013, 2010 Daniel T. Valentine. Published by Elsevier Ltd. All rights reserved.
Copyright 2007, 2006, 2002 Brian D. Hahn and Daniel T. Valentine. Published by Elsevier Ltd.
MATLAB is a trademark of The MathWorks, Inc. and is used with permission. The MathWorks does not warrant the accuracy of the text or exercises in this book. This book's use or discussion of MATLAB software or related products does not constitute endorsement or sponsorship by The MathWorks of a particular pedagogical approach or particular use of the MATLAB software.
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, or otherwise, without the prior written permission of the publisher.
Permissions may be sought directly from Elsevier's Science & Technology Rights Department in Oxford, UK: phone: (+44) 1865 843830, fax: (+44) 1865 853333, E-mail: ), by selecting Support & Contact then Copyright and Permission and then Obtaining Permissions.
Library of Congress Cataloging-in-Publication Data A catalog record for this book is available from the Library of Congress.
British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library.
ISBN: 978-0-08-100877-5
For information on all Academic Press publications visit our website at https://www.elsevierdirect.com
Publisher: Todd Green
Acquisition Editor: Stephen Merken
Editorial Project Manager: Nate McFadden
Production Project Manager: Stalin Viswanathan
Designer: Matthew Limbert
Typeset by VTeX
Preface
Daniel T. Valentine
The main reason for a sixth edition of Essential MATLAB for Engineers and Scientists is to keep up with MATLAB, now in its latest version (9.0 Version R2016a). Like the previous editions, this one presents MATLAB as a problem-solving tool for professionals in science and engineering, as well as students in those fields, who have no prior knowledge of computer programming.
In keeping with the late Brian D. Hahn's objectives in previous editions, the sixth edition adopts an informal, tutorial style for its teach-yourself approach, which invites readers to experiment with MATLAB as a way of discovering how it works. It assumes that readers have never used this tool in their technical problem solving.
MATLAB, which stands for Matrix Laboratory, is based on the concept of the matrix. Because readers will be unfamiliar with matrices, ideas and constructs are developed gradually, as the context requires. The primary audience for Essential MATLAB is scientists and engineers, and for that reason certain examples require some first-year college math, particularly in Part II. However, these examples are self-contained and can be skipped without detracting from the development of readers' programming skills.
MATLAB can be used in two distinct modes. One, in keeping the modern-age craving for instant gratification, offers immediate execution of statements (or groups of statements) in the Command Window. The other, for the more patient, offers conventional programming by means of script files. Both modes are put to good use here: The former encouraging cut and paste to take full advantage of Windows' interactive environment. The latter stressing programming principles and algorithm development through structure plans.
Although most of MATLAB's basic (essential) features are covered, this book is neither an exhaustive nor a systematic reference. This would not be in keeping with its informal style. For example, constructs such as for and if are not always treated, initially, in their general form, as is common in many texts, but are gradually introduced in discussions where they fit naturally. Even so, they are treated thoroughly here, unlike in other texts that deal with them only superficially. For the curious, helpful syntax and function quick references can be found in the appendices.
The following list contains other highlights of Essential MATLAB for Engineers and Scientists, Sixth Edition:
Warnings of the many pitfalls that await the unwary beginner
Numerous examples taken from science and engineering (simulation, population modeling, numerical methods) as well as business and everyday life
An emphasis on programming style to produce clear, readable code
Comprehensive chapter summaries
Chapter exercises (answers and solutions to many of which are given in an appendix)
A thorough, instructive index
Essential MATLAB is meant to be used in conjunction with the MATLAB software. The reader is expected to have the software at hand in order to work through the exercises and thus discover how MATLAB does what it is commanded to do. Learning any tool is possible only through hands-on experience. This is particularly true with computing tools, which produce correct answers only when the commands they are given and the accompanying data input are correct and accurate.
Acknowledgments
I would like to thank Mary, Clara, Zoe Rae and Zach T. for their support and encouragement. I dedicate the sixth edition of Essential MATLAB for Engineers and Scientists to them.
Introduction
Part 1 concerns those aspects of MATLAB that you need to know in order to come to grips with MATLAB's essentials and those of technical computing. Because this book is a tutorial, you are encouraged to use MATLAB extensively while you go through the text.
Chapter 1
Introduction
Abstract
The objectives of this chapter are to enable you to use some simple MATLAB commands from the Command Window, to examine various MATLAB desktop and editing features, to learn some of the new features of the MATLAB R2016a Desktop, to learn to write scripts in the Editor and Run them from the Editor, and to learn some of the new features associated with the tabs (in particular, the PUBLISH and APPS features). In this chapter you learn that MATLAB is a matrix-based computer system designed to assist in scientific and engineering problem solving. You also learn that one way to use MATLAB is to enter commands and statements on the command line in the Command Window. In this case the commands you enter are carried out immediately. You are also introduced to a number of useful built-in commands and functions.