Introduction

MATLAB is an amazing product that helps you perform math-related tasks of all sorts using the same techniques that you’d use if you were performing the task manually (using pencil and paper, slide rule, or abacus if necessary, but more commonly using a calculator). However, MATLAB makes it possible to perform these tasks at a speed that only a computer can provide. In addition, using MATLAB reduces errors, streamlines many tasks, and makes you more efficient.

More important, MATLAB makes sharing your efforts with others incredibly easy. You can use Live Scripts to create report-like output that management can understand, or to develop apps for coworkers to employ when performing their tasks.

MATLAB is also a big product with numerous tools and features that you might never have used in the past. For example, instead of simply working with numbers, you have the ability to plot them in a variety of ways that help you communicate the significance of your data to other people. To get the most from MATLAB, you really need a book like MATLAB For Dummies, 2nd Edition.

About This Book

The main purpose of MATLAB For Dummies, 2nd Edition is to reduce the learning curve that comes with using a product that offers as much as MATLAB does. When you first start MATLAB, you might become instantly overwhelmed by everything you see. This book helps you get past that stage and become productive quickly so that you can get back to performing amazing feats of math wizardry.

In addition, this book introduces you to techniques that you might not know about or even consider because you haven’t been exposed to them before. For example, MATLAB provides a rich plotting environment that helps you not only communicate better but also present numeric information in a manner that helps others see your perspective.

Using scripts and functions will also reduce the amount of work you have to do. This book shows you how to create custom code, which you can use to customize the environment to meet your specific needs. This edition introduces you to Live Scripts and Live Functions, which enable you to combine code and output into a single report-like version that everyone can use, even if they don’t necessarily understand the math. Using classes helps you package your code to make it easier to reuse and understand. If you want to create a form of your code that is accessible to coworkers and people who may not want to know why something works, just that it does, you can also discover apps and toolboxes.

After you’ve successfully installed MATLAB on whatever computer platform you’re using, you start with the basics and work your way up. By the time you finish working through the examples in this book, you’ll be able to perform a range of simple tasks in MATLAB that includes writing scripts, writing functions, creating plots, and performing advanced equation solving. No, you won’t be an expert, but you will be able to use MATLAB to meet specific needs in the job environment.

To make absorbing the concepts even easier, this book uses the following conventions:

· Text that you’re meant to type just as it appears in the book is bold. The exception is when you’re working through a step list: Because each step is bold, the text to type is not bold.

· When you see words in italics as part of a typing sequence, you need to replace that value with something that works for you. For example, if you see “Type Your Name and press Enter,” you need to replace Your Name with your actual name.

· Web addresses and programming code appear in monofont. If you’re reading a digital version of this book on a device connected to the Internet, note that you can click the web address to visit that website, like this: https://www.dummies.com.

· When you need to type command sequences, you see them separated by a special arrow, like this: File ⇒ New File. In this case, you go to the File menu first and then select the New File entry on that menu. The result is that you see a new file created.

Foolish Assumptions

You might find it difficult to believe that we’ve assumed anything about you — after all, we haven’t even met you yet! Although most assumptions are indeed foolish, we made these assumptions to provide a starting point for the book.

Being familiar with the operating system platform you want to use is important because the book doesn’t provide any guidance in this regard. (Chapter 2 does provide MATLAB installation instructions.) You really do need to know how to install applications, use applications, and generally work with your chosen platform before you begin working with this book.

This book isn’t a math primer. Yes, you see lots of examples of complex math, but the emphasis is on helping you use MATLAB to perform math tasks rather than learn math theory. Chapter 1 helps you understand precisely what you need to know from a math perspective in order to use this book successfully.

This book also assumes that you can access items on the Internet. Sprinkled throughout are numerous references to online material that aren’t mandatory but can enhance your learning experience. However, these added sources are useful only if you actually find and use them.

Icons Used in This Book

As you read this book, you see icons in the margins that indicate material of interest (or not, as the case may be). This section briefly describes each icon in this book.

Tip Tips are nice because they help you save time or perform some task without a lot of extra work. The tips in this book are time-saving techniques or pointers to resources that you should try in order to get the maximum benefit from MATLAB.

Warning We don’t want to sound like angry parents or some kind of maniacs, but you should avoid doing anything that’s marked with a Warning icon. Otherwise, you might find that your application fails to work as expected, you get incorrect answers from seemingly bulletproof equations, or (in the worst-case scenario) you lose data.

Technical Stuff Whenever you see this icon, think advanced tip or technique. You might find these tidbits of useful information just too boring for words, or they could contain the solution you need to get a program running. Skip these bits of information whenever you like.

Remember If you don’t get anything else out of a particular chapter or section, remember the material marked by this icon. This text usually contains an essential process or a bit of information that you must know to work with MATLAB successfully.

Beyond the Book

This book isn’t the end of your MATLAB experience — it’s really just the beginning. We provide online content to make this book more flexible and better able to meet your needs. That way, as we receive email from you, we can address questions and tell you how updates to either MATLAB or its associated add-ons affect book content. In fact, you gain access to all these cool additions:

· Cheat sheet: You remember using crib notes in school to make a better mark on a test, don’t you? You do? Well, a cheat sheet is sort of like that. It provides you with some special notes about tasks that you can do with MATLAB that not every other person knows. You can find the Cheat Sheet for this book at www.dummies.com and entering MATLAB For Dummies, 2nd Edition in the Search field. Click Cheat Sheets in the row of options under the book title.

· Errata: You can find errata by going to www.dummies.com/go/matlabfd2e. Scroll under the image of the book cover to find the Errata link, if there is one. In addition to errata, check out the blog posts with answers to reader questions and demonstrations of useful book-related techniques at http://blog.johnmuellerbooks.com/.

· Companion files: Hey! Who really wants to type all the code in the book and reconstruct all those plots by hand? Most readers would prefer to spend their time actually working with MATLAB and seeing the interesting things it can do, rather than typing. Fortunately for you, the examples used in the book are available for download. You can find these files by going to www.dummies.com/go/matlabfd2e. Scroll under the image of the book cover to find the Downloads link. Alternatively, you can obtain the source code at John Mueller Books Writing with Style (http://www.johnmuellerbooks.com/source-code/). Just locate the book’s name and click the Download button.

Where to Go from Here

It’s time to start your MATLAB adventure! If you’re completely new to MATLAB, you should start with Chapter 1 and progress through the book at a pace that allows you to absorb as much of the material as possible.

If you’re a novice who’s in an absolute rush to get going with MATLAB as quickly as possible, you could skip to Chapter 2 with the understanding that you may find some topics a bit confusing later. Skipping to Chapter 3 is possible if you already have MATLAB installed, but be sure to at least skim Chapter 2 so that you know what assumptions we made writing this book.

Readers who have some exposure to MATLAB can save reading time by moving directly to Chapter 5. You can always go back to earlier chapters as necessary when you have questions. However, it’s important that you understand how each technique works before moving to the next one. Every technique, coding example, and procedure has important lessons for you, and you could miss vital content if you start skipping too much information.

Previous
Page
Next
Page

Contents

If you find an error or have any questions, please email us at admin@erenow.org. Thank you!