MATLAB For Dummies

22,99 €*

Lieferzeit Sofort lieferbar

MATLAB For Dummies, Wiley
Von Jim Sizemore, John Paul Mueller, im heise Shop in digitaler Fassung erhältlich
Format
(Hinweis: DRM-geschützt)
Anzahl:
Artikel-Beschreibung
GO FROM TOTAL MATLAB NEWBIE TO PLOTTING GRAPHS AND SOLVING EQUATIONS IN A FLASH!

MATLAB is one of the most powerful and commonly used tools in the STEM field. But did you know it doesn’t take an advanced degree or a ton of computer experience to learn it? MATLAB For Dummies is the roadmap you’ve been looking for to simplify and explain this feature-filled tool.

This handy reference walks you through every step of the way as you learn the MATLAB language and environment inside-and-out. Starting with straightforward basics before moving on to more advanced material like Live Functions and Live Scripts, this easy-to-read guide shows you how to make your way around MATLAB with screenshots and newly updated procedures. It includes:

* A comprehensive introduction to installing MATLAB, using its interface, and creating and saving your first file
* Fully updated to include the 2020 and 2021 updates to MATLAB, with all-new screenshots and up-to-date procedures
* Enhanced debugging procedures and use of the Symbolic Math Toolbox
* Brand new instruction on working with Live Scripts and Live Functions, designing classes, creating apps, and building projects
* Intuitive walkthroughs for MATLAB’s advanced features, including importing and exporting data and publishing your work

Perfect for STEM students and new professionals ready to master one of the most powerful tools in the fields of engineering, mathematics, and computing, MATLAB For Dummies is the simplest way to go from complete newbie to power user faster than you would have thought possible.

JOHN PAUL MUELLER is an author and technical editor with experience in application development, database management, machine learning, and deep learning. He has written hundreds of books and articles helping everyday people learn everything from networking to database management.INTRODUCTION 1

About This Book 1

Foolish Assumptions 2

Icons Used in This Book 3

Beyond the Book 4

Where to Go from Here 4

PART 1: GETTING STARTED WITH MATLAB 7

CHAPTER 1: INTRODUCING MATLAB AND ITS MANY USES 9

Putting MATLAB in Its Place 10

Understanding how MATLAB relates to a Turing machine 10

Using MATLAB as more than a calculator 13

Determining why you need MATLAB 14

Discovering Who Uses MATLAB for Real-World Tasks 17

Knowing How to Get the Most from MATLAB 18

Getting the basic computer skills 18

Defining the math requirements 19

Applying what you know about other procedural languages 19

Understanding how this book will help you 20

Getting Over the Learning Curve 20

CHAPTER 2: STARTING YOUR COPY OF MATLAB 21

Installing MATLAB 22

Discovering which platforms MATLAB supports 22

Getting your copy of MATLAB 23

Performing the installation 23

Activating the product 24

Meeting the MATLAB Interface 25

Starting MATLAB for the first time 25

Considering the default Toolstrip tabs 27

Working with the Quick Access toolbar (QAT) 29

Employing the Command Window 30

Getting additional help with MATLAB 31

Using the Current Folder toolbar 32

Viewing the Current Folder window 32

Changing the MATLAB layout 38

CHAPTER 3: INTERACTING WITH MATLAB 41

Using MATLAB as a Calculator 42

Entering information at the prompt 42

Entering a formula 44

Copying and pasting formulas 44

Changing the Command Window formatting 46

Suppressing Command Window output 47

Understanding the MATLAB Math Syntax 48

Adding, subtracting, multiplying, and dividing 48

Working with exponents 50

Organizing Your Storage Locker 51

Using ans — the default storage locker 52

Creating your own storage lockers 52

Operating MATLAB as More Than a Calculator 54

Learning the truth 54

Using the built-in functions 54

Accessing the function browser 56

Recovering from Mistakes 57

Understanding the MATLAB error messages 58

Stopping MATLAB when it hangs 58

CHAPTER 4: STARTING, STORING, AND SAVING MATLAB FILES 61

Examining MATLAB’s File Structure 62

Understanding the MATLAB files and what they do 63

Exploring folders with the GUI 65

Exploring folders with commands 69

Working with files in MATLAB 72

Accessing and Sharing MATLAB Files 74

Opening 74

Exporting 75

Importing 76

Saving Your Work 78

Saving variables with the GUI 78

Saving variables using commands 78

Saving commands with the GUI 79

Saving commands using commands 79

Using online storage 80

PART 2: MANIPULATING AND PLOTTING DATA IN MATLAB 81

CHAPTER 5: EMBRACING VECTORS, MATRICES, AND HIGHER DIMENSIONS 83

Working with Vectors and Matrices 84

Understanding MATLAB’s perspective of linear algebra 84

Entering data 86

Adding and Subtracting 92

Understanding the Many Ways to Multiply and Divide 94

Performing scalar multiplication and division 94

Employing matrix multiplication 95

Dividing two vectors 98

Effecting matrix division 98

Creating powers of matrices 101

Using complex numbers 102

Working with exponents 104

Working with Higher Dimensions 105

Creating a multidimensional matrix 105

Accessing a multidimensional matrix 108

Replacing individual elements 109

Replacing a range of elements 110

Modifying the matrix size 112

Using cell arrays and structures 113

Using the Matrix Helps 117

CHAPTER 6: UNDERSTANDING PLOTTING BASICS 121

Considering Plots 121

Understanding what you can do with plots 122

Comparing MATLAB plots to spreadsheet graphs 122

Creating a plot using commands 123

Creating a plot using the Workspace window 125

Creating a plot using the Plots tab options 126

Using the Plot Function 128

Working with line color, markers, and line style 128

Creating multiple plots in a single command 129

Modifying Any Plot 130

Making simple changes 130

Adding to a plot 132

Deleting a plot 134

Working with subplots 134

Plotting with 2D Information 137

CHAPTER 7: USING ADVANCED PLOTTING FEATURES 139

Plotting with 3D Information 140

Using the bar() function to obtain a flat 3D plot 140

Using bar3() to obtain a dimensional 3D plot 144

Using barh() and more 146

Enhancing Your Plots 147

Getting an axes handle 147

Modifying axes labels 148

Adding a title 150

Rotating label text 151

Employing annotations 153

Printing your plot 154

Using the Plot Extras 155

Creating axes dates using datetick() 155

Creating plots with colorbar() 157

Interacting with daspect 159

Interacting with pbaspect 161

PART 3: STREAMLINING MATLAB 163

CHAPTER 8: AUTOMATING YOUR WORK 165

Understanding What Scripts Do 166

Creating less work for yourself 166

Defining when to use a script 167

Creating a Script 168

Writing your first script 168

Using commands for user input 170

Copying and pasting into a script 171

Converting the Command History into a script 172

Continuing long strings 172

Adding comments to your script 174

Revising Scripts 179

Calling Scripts 179

Improving Script Performance 180

Analyzing Scripts for Errors 181

Using the MATLAB Profiler to Improve Performance 182

CHAPTER 9: EXPANDING MATLAB’S POWER WITH FUNCTIONS 185

Working with Built-in Functions 186

Learning about built-in functions 186

Sending data in and getting data out 191

Creating a Function 191

Understanding script and function differences 192

Understanding built-in function and custom function differences 193

Writing your first function 193

Using the new function 195

Passing data in 196

Passing data out 198

Creating and using global variables 199

Using subfunctions 202

Nesting functions 203

Using Other Types of Functions 204

Inline functions 204

Anonymous functions 205

CHAPTER 10: ADDING STRUCTURE TO YOUR SCRIPTS 207

Making Decisions 208

Using the if statement 208

Using the switch statement 212

Understanding the switch difference 214

Deciding between if and switch 214

Creating Recursive Functions 215

Performing Tasks Repetitively 219

Using the for statement 219

Using the while statement 220

Starting a new loop iteration using continue 221

Ending processing using break 222

Ending processing using return 223

Determining which loop to use 225

Creating Menus 225

CHAPTER 11: WORKING WITH LIVE SCRIPTS 229

Comparing a Live Script to a Regular Script 230

Working with the Live Editor 231

Opening the Live Editor 232

Working with the Output pane 232

Adding formatted text 235

Using plots within the coded area 236

Incorporating graphics 237

Incorporating controls 238

Running Live Script Sections 241

Diagnosing Coding Errors 242

CHAPTER 12: WORKING WITH LIVE FUNCTIONS 245

Comparing a Live Function to a Regular Function 246

Understanding Live Function Flexibility Differences 247

Creating a Live Function 247

Running a Live Function 248

Refactoring a Live Function 249

Using the specialized coding buttons 253

Going to a specific function 254

Converting a Function to a Live Function 255

Sharing Live Functions and Live Scripts 256

Using an interactive document 256

Employing a full screen presentation 257

Working with plain text 257

Creating a static document 257

Performing Comparisons and Merges 259

Comparing Live Functions and Live Scripts 259

Merging Live Functions and Live Scripts 260

CHAPTER 13: DESIGNING AND USING CLASSES 263

A Brief Overview of Object-Oriented Programming (OOP) 264

Defining an object 264

Considering how properties define an object 265

Using methods to interact with an object 266

Listening to an object using events 267

Understanding the need for privacy 268

Understanding OOP in MATLAB 268

Comparing MATLAB OOP to other languages 269

Uses of classes and objects in MATLAB 270

Performing tasks with objects in MATLAB 271

Creating a Basic MATLAB Class 272

Starting the class 272

Adding properties 275

Specifying methods 278

CHAPTER 14: CREATING MATLAB APPS 281

Working with the App Designer 282

Understanding apps 282

Getting apps 283

Starting the App Designer 286

Defining an Interface 290

Understanding the various components 290

Changing the component properties 292

Making the Interface Functional 293

Working with Code View 294

Creating a callback function 295

Running the App 297

Packaging Your App 298

CHAPTER 15: BUILDING PROJECTS 301

Considering the Need for Projects 302

Creating a New Project 303

Choosing a project type 303

Using the Project editor 305

Understanding the Project Dependencies 309

Running Required Checks 311

Checking project integrity 311

Looking for potential updates 311

PART 4: EMPLOYING ADVANCED MATLAB TECHNIQUES 315

CHAPTER 16: IMPORTING AND EXPORTING DATA 317

Importing Data 318

Avoiding older import/export function calls 319

Performing import basics 319

Importing mixed strings and numbers 325

Importing selected rows or columns 327

Exporting Data 328

Performing export basics 328

Exporting scripts and functions 331

Working with Images 332

Exporting images 332

Importing images 333

CHAPTER 17: PRINTING AND PUBLISHING YOUR WORK 335

Using Commands to Format Text 336

Modifying font appearance 336

Using special characters 344

Adding math symbols 346

Publishing Your MATLAB Data 350

Performing advanced script and function publishing tasks 350

Saving your figures to disk 354

Printing Your Work 355

Configuring the output page 355

Printing the data 356

CHAPTER 18: RECOVERING FROM MISTAKES 357

Working with Error Messages 358

Responding to error messages 359

Understanding the MException class 361

Creating error and warning messages 362

Setting warning message modes 365

Understanding Quick Alerts 366

Relying on Common Fixes for MATLAB’s Error Messages 368

Making Your Own Error Messages 369

Developing the custom error message 370

Creating useful error messages 374

Using Good Coding Practices 375

PART 5: SPECIFIC MATLAB APPLICATIONS 379

CHAPTER 19: SOLVING EQUATIONS AND FINDING ROOTS 381

Working with the Symbolic Math Toolbox 382

Obtaining your copy of the Symbolic Math Toolbox 382

Installing the Symbolic Math Toolbox 384

Working with the GUI 386

Typing a simple command in the Command Window 387

Performing Algebraic Tasks 388

Differentiating between numeric and symbolic algebra 389

Solving quadratic equations 390

Working with cubic and other nonlinear equations 392

Understanding interpolation 393

Working with Statistics 395

Understanding descriptive statistics 395

Understanding robust statistics 398

Employing the Symbolic Math Toolbox for plotting 401

CHAPTER 20: PERFORMING ANALYSIS 405

Using Linear Algebra 406

Working with determinants 406

Performing reduction 407

Using eigenvalues 409

Understanding factorization 409

Employing Calculus 411

Working with differential calculus 411

Using integral calculus 413

Working with multivariate calculus 413

Solving Differential Equations 415

Using the numerical approach 415

Using the symbolic approach 416

PART 6: THE PART OF TENS 419

CHAPTER 21: THE TOP TEN USES OF MATLAB 421

Working with Linear Algebra 422

Performing Numerical Analysis 422

Designing a Neural Network Simulation 423

Getting Involved in Science 423

Logging Sensor Data 424

Exploring Research 424

Creating Light Animations Using Arduino 425

Employing Image Processing 425

Controlling Industrial Equipment 426

Performing Audio Compression Using Wavelets 427

CHAPTER 22: TEN WAYS TO MAKE A LIVING USING MATLAB 429

Working with Green Technology 430

Creating Speech Recognition Software 430

Performing Antenna Analysis and Design 431

Getting Disease under Control 432

Becoming a Computer Chip Designer 432

Working with Robots 433

Keeping the Trucks Rolling 433

Designing Equipment Used in the Field 434

Reducing Risks Using Simulation 434

Creating Security Solutions 435

Appendix A: MATLAB Functions 437

Appendix B: MATLAB’s Plotting Routines 447

Index 453
Artikel-Details
Anbieter:
Wiley
Autor:
Jim Sizemore, John Paul Mueller
Artikelnummer:
9781119796909
Veröffentlicht:
27.05.2021
Seitenanzahl:
496