Preface |
Introduction / 1: |
Getting Oriented / 1.1: |
Getting an Overview of This Book / 1.2: |
Understanding Computer Architecture / 1.3: |
Approaching the Task of Programming / 1.4: |
Deciding Whether a Program is Needed and if You Should Write It / 1.5: |
Being as Clear as Possible About What Your Program Should Do / 1.6: |
Working Incrementally / 1.7: |
Being Open to Negative Feedback / 1.8: |
Programming With a Friend / 1.9: |
Writing Concise Programs / 1.10: |
Writing Clear Programs / 1.11: |
Understanding How the Chapters of This Book are Organized / 1.12: |
Using the Web Site Associated With This Book / 1.13: |
Acknowledging Limits / 1.14: |
Interacting With MATLAB / 2: |
Using MATLAB's Windows / 2.1: |
Using the Command Window / 2.2: |
Writing Tiny Programs in the Command Window / 2.3: |
Allowing or Suppressing Outputs by Omitting or Including End-of-Line Semicolons / 2.4: |
Editing, Saving, and Running MATLAB Programs / 2.5: |
Running and Debugging MATLAB Programs / 2.6: |
Keeping a Diary / 2.7: |
Practicing Interacting with MATLAB / 2.8: |
Matrices / 3: |
Creating Matrices / 3.1: |
Locating Elements of Matrices / 3.2: |
Concatenating Matrices / 3.3: |
Determining the Size of a Matrix / 3.4: |
Transposing a Matrix / 3.5: |
Creating Matrices with Shorthand Methods / 3.6: |
Checking the Status of Matrices / 3.7: |
Clearing and Emptying Matrices / 3.8: |
Practicing with Matrices / 3.9: |
Calculations / 4: |
Adding, Subtracting, Multiplying, Dividing Values, and Raising Values to a Power / 4.1: |
Using Built-in Functions to Compute the Square Root, Remainder, Absolute Value, Base of the Natural Logarithms Raised to a Power, and the Logarithm / 4.2: |
Ordering Calculations / 4.3: |
Performing Statistical Calculations to Obtain the Sum, Mean, Standard Deviation, Variance, Correlation, and Least-Squares Fit / 4.4: |
Performing Statistical Calculations With Missing Data / 4.5: |
Calculating with Matrices / 4.6: |
Using Matrix Algebra / 4.7: |
Obtaining the Max, Min, Sort, Round, Floor, and Ceiling / 4.8: |
Generating Random Numbers / 4.9: |
Generating Magic Squares and Calendars / 4.10: |
Practicing Calculations / 4.11: |
Contingencies / 5: |
Using the if...else...end Construct / 5.1: |
Using the switch....case...end Construct / 5.2: |
Using the for...end construct / 5.3: |
Using the while...end Construct and Escaping From Runaway Loops / 5.4: |
Vectorizing Rather Than Using for...end / 5.5: |
If-ing Instantly / 5.6: |
If-ing Instantly Once Again and Finding Indices of Satisfying Values / 5.7: |
Practicing Contingencies / 5.8: |
Input-Output / 6: |
Copying and Pasting Data By Hand / 6.1: |
Getting Input From a User and Displaying the Result / 6.2: |
Pausing / 6.3: |
Recording Reaction Times and Other Delays With tic...toc / 6.4: |
Formatting Numbers for Screen Outputs / 6.5: |
Assigning Arrays of Literal Characters (Strings) to Variables / 6.6: |
Converting Numbers to Strings, and Concatenating Strings / 6.7: |
Comparing Strings / 6.8: |
Evaluating Strings and Generating Numbered Variables on the Fly / 6.9: |
Controlling File Print Formats / 6.10: |
Writing Data to Named Files / 6.11: |
Checking and Changing the Current Directory / 6.12: |
Reading Data Saved as Plain Text / 6.13: |
Reading Data From and Writing Data to Excel Spreadsheets / 6.14: |
Taking Precautions Against Overwriting Files / 6.15: |
Learning More About input and output / 6.16: |
Practicing input-output / 6.17: |
Data Types / 7: |
Identifying Strings, Numbers of Different Types, and Booleans / 7.1: |
Converting Characters to Numbers and Vice Versa / 7.2: |
Creating and Accessing Cells / 7.3: |
Creating and Accessing Structures / 7.4: |
Practicing Data Types / 7.5: |
Modules and Functions / 8: |
Taking a Top-Down Approach to Programming by Using Modules / 8.1: |
Writing and Using General-Purpose Functions / 8.2: |
Getting Multiple Outputs From Functions / 8.3: |
Giving Multiple Inputs to Functions / 8.4: |
Creating Subfunctions / 8.5: |
Calling Functions Properly / 8.6: |
Drawing on Previously Defined Functions Versus Creating Your Own / 8.7: |
Practicing Modules and Functions / 8.8: |
Plots / 9: |
Deciding to Plot Data and, for Starters, Plotting a Sine Function / 9.1: |
Controlling Axes / 9.2: |
Controlling the Appearance of Plotted Points and Lines / 9.3: |
Having More Than One Graph Per Plot and More Types of Points and Lines / 9.4: |
Getting and Setting Properties of Plotted Points / 9.5: |
Adding xlabels, ylabels, and titles / 9.6: |
Adding Legends / 9.7: |
Adding Text / 9.8: |
Fitting Curves / 9.9: |
Creating Subplots and Turning Grids, Boxes, and Axes On and Off / 9.10: |
Exploiting Matrix Assignments to Merge Subplots / 9.11: |
Getting and Setting Properties of Axes / 9.12: |
Plotting Data Points With Error Bars / 9.13: |
Generating Polar Plots / 9.14: |
Generating Histograms / 9.15: |
Generating Bar Graphs / 9.16: |
Exporting and Printing Figures / 9.17: |
Generating Other Kinds of Graphs and Getting and Setting Figure Properties / 9.18: |
Practicing Plots / 9.19: |
Lines, Shapes, and Images / 10: |
Generating Lines / 10.1: |
Forming and Filling Shapes / 10.2: |
Loading Images / 10.3: |
Clicking in Figure Windows To Add Graphics, Add Text, or Record Responses / 10.4: |
Saving and Reloading Figures / 10.5: |
Practicing Lines, Shapes, and Images / 10.6: |
Three-Dimensional Graphics / 11: |
Generating Three-Dimensional Bar Graphs / 11.1: |
Plotting in Three Dimensions / 11.2: |
Plotting "Above" a Meshgrid / 11.3: |
Plotting "Meshy" Data / 11.4: |
"Surfing" the "Web" / 11.5: |
Changing Points of View / 11.6: |
Generating Contours / 11.7: |
Checking Your Understanding of Meshgrid-Based Graphing / 11.8: |
Generating Rectangular Solids / 11.9: |
Generating Spheres and Cylinders / 11.10: |
Generating Ellipsoids / 11.11: |
Practicing 3D Graphics / 11.12: |
Animations / 12: |
Animating by Whiting Out Successive Images / 12.1: |
Watching Comets / 12.2: |
Animating by Drawing Now / 12.3: |
Making Movies / 12.4: |
Saving Movies / 12.5: |
Reading and Running Previously Saved Movies / 12.6: |
Practicing Animation / 12.7: |
Sound / 13: |
Playing Beeps / 13.1: |
Loading and Playing Other Sound Files / 13.2: |
Controlling Volume / 13.3: |
Staggering or Overlapping Sounds and Delaying Sounds / 13.4: |
Controlling Volume While Staggering or Overlapping Sounds / 13.5: |
Creating Your Own Sound Files Computationally / 13.6: |
Writing and Reading Files For Sound / 13.7: |
Learning More About Sound-Related Functions / 13.8: |
Practicing Sounds / 13.9: |
Going On / 14: |
Profiling Program Efficiency / 14.1: |
Opening and Editing Math Works-Supplied Functions / 14.2: |
Using Toolboxes From the MathWorks and Other Sources / 14.3: |
Creating Your Own Toolboxes / 14.4: |
Creating Graphical User Interfaces (GUIs) / 14.5: |
Creating Stand-Alone Applications / 14.6: |
Reading Further / 14.7: |
References / 15: |
Solutions To Selected Problems / 16: |
Author Index |
Subject Index |
Preface |
Introduction / 1: |
Getting Oriented / 1.1: |
Getting an Overview of This Book / 1.2: |
Understanding Computer Architecture / 1.3: |
Approaching the Task of Programming / 1.4: |