Description
In this course, you will learn :
- Introduction to MATLAB
- How to write scripts and functions
- Visualize data in 2D and 3D
- Control statements
- Develop your programming style
- Think like a programmer
- Find and fix bugs!
- Learn the most common coding mistakes and how to avoid them
- Strategies for planning and organizing your code
Syllabus :
1. The MATLAB desktop environment
- The MATLAB desktop environment
- MATLAB as a calculator, colon operator
- Solve some MATLAB exercises!
2. Variables
- What are variables?
- Indexing number arrays
- Variables for strings
- Variables for logicals (Booleans)
- Variables for structures
- Variable naming rules and recommendations
3. Scripts and functions, part 1
- Scripts and functions; organization
- Function inputs and outputs
- Getting help on functions
- Comments, cells, spacing
- The MATLAB path
- Parameters and hard-coding vs. soft-coding
4. Getting data into and out of MATLAB
- Copy-paste, loading MATLAB format files, Excel, and image files
- Exporting data in MATLAB, text, and Excel formats
5. Control statements
- Control statement architecture; if and switch commands
- For-loops
- While-loops
- Try-catch statements
- Application (1 of 2): import data
- Application (2 of 2): export data
6. Visualizing data and functions
- The importance of visualization; figure parts
- Plotting lines in 2D and in 3D
- Making bar plots with error bars
- imagesc, contourf, and surf
- Improve your figure with get and set
7. Functions
- Input checks on basicstats.m
- Creating functions, example II
- Creating functions: unique elements and frequencies
- Anonymous functions
- Set your preferences in startup.m and finish.m
8. Debugging
- Types of programming difficulties, and tips for preventing errors
- The FIP (find, inspect, plot) strategy for debugging
- MATLAB profiler