Learning to Program with
MATLAB:
Section references are to the Wiley textbook: Learning
to Program with MATLAB: Building GUI Tools
MATLAB
programs from this text (click on individual .m or .fig files and “Save
link as …”)
NOTE: Videos can be helpfully played at faster-than-normal
speed (1.25x, 1.5x, 1.75x, …) using the Player Settings on the lower right
corner of the video player.
1. Introduction
a.
Setting up the MATLAB IDE [5:47] Sec.
1.1
b.
MATLAB
variables and assignment statements [11:29] Sec. 1.2
c.
Variable names in
MATLAB [5:17] Sec. 1.2
d.
Numbers in MATLAB [7:40]
Sec. 1.3
e.
Writing a program [11:14] Sec.
1.5
f.
Introduction to the
debugger [6:02]
Sec.1.6, 1.7
2. Strings
a.
Strings and
Character arrays [11:26] Sec. 2.1
b.
The INPUT command [2:52] Sec. 2.3
c.
Example: takeOrder [2:57]
3. Arrays
a.
Arrays and vectors [5:21] Sec. 2.4,4.1
b.
Vector operations [8:05] Sec. 2.5
c.
Vector functions [4:45] Sec. 2.6,2.7
4. Plotting
a.
PLOT command basics
[5:10] Sec. 3.1
b.
Plotting a
tabulated function [6:08] Sec. 3.2
c.
Example:
PlotQuartic [2:33] Sec. 3.2
5. Conditional execution: IF
a.
The basic IF statement [5:38] Sec. 5.1
b.
Extended
if-then-elseif-elseif…else-end [8:32] Sec. 5.1
c.
Example: getName [1:20] Sec. 5.1
d.
Logical variables [6:43] Sec. 5.3
e.
Comparing Strings [3:46] Sec. 5.5
f.
SWITCH statement [3:07] Sec. 5.6
6. FOR loops
a.
FOR loops [7:18] Sec. 5.4
b.
Nested FOR [1:51] Sec. 5.4
c.
Example of nested FOR
[7:33] Sec. 5.4
7. FOR motifs
a.
Accumulation [4:11] Sec. 5.4
b.
Animation
i.
Animation basics [4:23] Sec. 6.1, 6.2
ii.
In-depth
explanation [4:51] Sec. 6.2
iii.
Example:
animateCircle [1:52]
c.
Domain marching
[9:55] Sec. 6.1
8. WHILE loops
a.
WHILE statement [4:42] Sec. 5.5
b.
Example: sayAmen
[2:20] Sec. 5.5
c.
Example: sayAmenN
[3:02] Sec. 5.5
9. Animation
a.
Example: Manhattan
random walk [8:12 ] Sec. 6.2
b.
LINE command
[4:59 ] Sec. 3.5
c.
Images in
animation—hunter shoots monkey [3:36 ] Sec.
13.5
10.
Functions
a.
Function basics
[12:17] Sec. 7.1-7.3
b.
Example: Gaussian
[2:00] Sec. 7.1-7.3
c.
Example:
IsLeapYear [4:40] Sec. 7.1-7.3
d.
Functions with
multiple inputs and outputs [3:48 ] 7.1-7.3
e.
Example:
Extending Gaussian [5:21] 7.1-7.3
f.
Debugging
functions and file structure [5:36] 7.1-7.3
11.
Other data classes
a.
Complex numbers
[5:43] Sec. 8.3
b.
Multidimensional arrays
and cell arrays [5:37] Sec. 8.1,8.5
c.
Structures [6:07] Sec. 8.2
12.
Introduction to GUI Tools
a.
Introduction to GUI Tools
[3:42] Sec. 9.1
b.
Building SillyTool [6:42] Sec. 9.1
c.
Building StartTool [9:35] Sec. 9.2
d.
Building
SliderTool
i.
Part 1: Communicating with
objects [11:13] Sec 9.3
ii.
Part 2:
Understanding objects and handles [5:26] Sec. 9.3
iii.
Part 3: Slider and
text synchonization [10:27] Sec 9.3
13.
Transforming a program into a GUI
Tool
a.
Step 1: Plan the
GUI [2:43] Sec 10.1
b.
Step 2: Create the
GUI with GUIDE [7:15] Sec 10.1
c.
Step 3: Transform
the program into an appropriate function [4:09] Sec 10.1
d.
Step 4: Connect the function to the GUI [7:50] Sec 10.1
e.
Improving a GUI
Tool [9:04] Sec 10.1,10.2 files
14.
More GUI Techniques
a.
Waitbars [4:18] Sec. 12.1
b.
Button groups [7:32] Sec. 11.8
c.
Adding menus to
GUI Tools [5:00] Sec. 12.9
d.
Saving and loading
files [2:52] Sec. 12.2
e.
Save and load menu items
[5:00] Sec. 12.2
f.
Using uiputfile and
uigetfile [7:04] Sec 12.2
g.
Communicating using
application data [9:16] Sec. 12.6
h.
Input dialogs [7:21] Sec 12.4
15.
Rates
a.
Euler Method [12:42] Sec. 6.3
b.
Improved Euler Method
[4:41] Sec. 6.3
16.
Verlet method
a.
The problem in solving
Newton’s equations [6:57] Sec. 6.3
b.
Verlet: the solution to
the problem [5:58] Sec. 6.3
c.
Example: damped harmonic
oscillator [6:57] Sec. 6.3
17.
Numerical Integration &
Differentiation
a.
Derivatives
of MATLAB functions: finite difference quotients [3:59] Sec.
14.1
b.
Derivatives of
tabulate functions: gradient [3:12] Sec.
14.1
c.
Integrating
tabulated functions: trapz file (corrected)[5:50] Sec. 14.2
d.
Integrals of
MATLAB functions [6:38] Sec. 14.2
e.
The
fundamental theorem of calculus [2:46] Sec.
14.1-2
18.
Working with images
a.
Representing
images digitally [14:29] Sec 13.5
b.
Placing images on an
axis [8:31] Sec. 13.5
c.
Transparency [4:30] Sec.
13.5
d.
Moving images [4:01] Sec. 13.5 files
e.
Making
objects active [5:42] Sec. 12.8
f.
Making images active
[4:09] Sec. 12.8 files
g.
Moving
composite objects in 3D—FlipCard [5:16] Sec
13.6 files
19.
Special Topics
a.
Adding to the
handles structure [4:23] files
b.
Functions
with a variable number of arguments [3:41]
c.
Multi-panel
GUI Tools [11:30] files
d.
Making objects
draggable [11:48] Sec. 12.8 files
e.
The uses of
invisibility [5:54] files
f.
Responding to keyboard
input [7:39] Sec. 12.7 files
g.
Stacking order of
graphical objects: parents and children [4:26]
h.
Reading
and writing text files [5:27] Sec.
12.3