images

Preface

I   MATLAB Programming

1   Getting Started

1.1   Running the MATLAB IDE

Manipulating windows

1.2   MATLAB variables

Variable assignment statements

Variable names

Variable workspace

1.3   Numbers and functions

1.4   Documentation

1.5   Writing simple MATLAB scripts

1.6   A few words about errors and debugging

1.7   Using the debugger

2   Strings and Vectors

2.1   String basics

2.2   Using the disp command to print a variable’s value

2.3   Getting information from the user

2.4   Vectors

2.5   Operations on vectors

2.6   Special vector functions

Statistical functions

2.7   Using rand and randi

3   Plotting

3.1   The plot command

3.2   Tabulating and plotting a simple function

3.3   Bar graphs and histograms

3.4   Drawing several plots on one graph

Multiple plots with a single plot command

Combining multiple plots with a hold command

3.5   Adding lines and text

4   Matrices

4.1   Entering and manipulating matrices

4.2   Operations on matrices

4.3   Solving linear systems: The backslash operator

Extended example: Solving circuit problems

4.4   Special matrix functions

5   Control Flow Commands

5.1   Conditional execution: The if statement

5.2   Logical expressions

5.3   Logical variables

5.4   for loops

5.5   while loops

5.6   Other control flow commands

Switch-case statement

Break statement (not recommended)

6   Animation

6.1   Basic animation

6.2   Animating function plots ...

Get Learning to Program with MATLAB: Building GUI Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.