1. Building Comfort With MATLAB
Wendy Thomas
Associate Professor of Bioengineering
University of Washington
1
2. My Teaching Experience
• Bioen 201 (2008 – 2010) sophomore core: intro
to mathematical programming (5 weeks) and
circuits (5 weeks)
• Bioen 485/585 (2004 – 2016) senior + graduate
elective: computational differential equation
modeling for bioengineering
• Bioen 503 (2010 – 2013) graduate core: systems
bioengineering (analytic and computational
systems models)
2
3. Keys to Building Comfort With MATLAB
SOFTWARE SUPPORT
• hands-on support in front of the computer
(lab, class or office hours with laptops or in
computer lab)
• Peer tutoring/workshops are great!
• tutorials (linked online or made just for the
course, but should get student from ground
zero to the first assignment)
• Practice
3
4. Keys to Building Comfort With MATLAB
Each activity requires:
• MOTIVATION
– Task should be easier to perform in MATLAB than in common
alternatives (calculator, EXCEL), even at this stage of experience.
– Task should relate to something of value (course content or
common experiences)
• LIMITED LEARNING OBJECTIVES
– Identify a limited set of computing concepts and MATLAB tools
that are easy to learn at this stage of experience
– Don’t let students spend hours on something unrelated to the
objectives. Jump start by providing needed resources such as:
• Pseudo-code activity to help design algorithm
• sample commented code for related problem
• Tutorial-like part 1 followed by independent part 2
4
5. Comfort With What?
Key scientific computing skills:
• INTRODUCTORY SKILLS:
– Arrays & algebra
– Scripts & functions,
– Plots
– Flow control
– Basic input/output
• INTERMEDIATE SKILLS:
– Use documentation to learn
new skills
– Debugging
– More input and output
– common functions:
fminsearch, ODEs, statistics,
visualization tools, etc,
• ADVANCED SKILLS:
– Algorithm design
– Data structures (e.g.
Structures(1).awesome)
– GUI design
– Advanced visualization tools
– Reliability tools (version
control, visual checks of
analysis, etc.)
5
6. Set Expectations
• Designing algorithms …
• Debugging
– Test hypotheses to divide and conquer
– Much more efficient than experiments to teach
logic
6
Move from cook book labs to independent thinking
7. Lesson 1
Motivation:
• MATLAB is easier and
more reliable for
moderately complex
calculations and for
plotting functions.
Learning Objectives:
• command line and scripts
• Simple syntax
• Arrays
• Plot command
• Maybe: Input (load)
Activity examples:
• plot how an algebraic
expression changes with
one or more parameter
values to explore an
equation from class
• Plot and analyze data
from a wet lab
• Plot and analyze a
provided data set
7
8. Lesson 2
Motivation:
• MATLAB helps with data
analysis
Learning Objectives:
• Input and output data
• Flow control
• Look up and call functions
Activity
• Process long data set
obtained in a lab to make
calculations.
• Long time series data are
great for this.
• My class: calculate
viscoelastic properties of
material from repeated
stress cycle data.
8
9. Lesson 3
Motivation:
• MATLAB provides flexible
fitting of models to data
Learning Objectives:
• Write functions
• fminsearch
Activity
• Test hypotheses to relate
experimental data to
concepts in class.
• My class: drug delivery
nanoparticles
9
0 10 20 30
0
10
20
30
40
50
60
70
0 10 20 30
-10
0
10
20
30
40
0 10 20 30
0
20
40
60
80
100
120
0 10 20 30
0
5
10
15
20
25
30
35