layout | title |
---|---|
lesson |
Programming with MATLAB |
The best way to learn how to program is to do something useful, so this introduction to MATLAB is built around a common scientific task: data analysis. Our real goal isn't to teach you MATLAB, but to teach you the basic concepts that all programming depends on. We use MATLAB in our lessons because:
- we have to use something for examples;
- it's well-documented;
- it has a large (and growing) user base among scientists in academia and the industry; and
- it has a large library of packages available for performing diverse tasks.
But the two most important things are to use whatever language your colleagues are using, so that you can share you work with them easily, and to use that language well.
- Analyzing Patient Data
- Writing MATLAB Scripts
- Repeating With Loops
- Creating Functions
- Making Choices
- Defensive Programming
To begin tackling this lesson, you will need to:
- Understand the concepts of files and directories, and the concept of a "working directory".
- Know how to start up MATLAB, and access the command window (which generally has a
>>
prompt).- Know how to create, edit and save text files.