Skip to main content

Beta
This lesson is in the beta phase, which means that it is ready for teaching by instructors outside of the original author team.
Introduction to Matlab 1
- MATLAB is used in many fields and can be used to analysis, process,
model and much more
- MATLAB is proprietary which has its own benefits and costs
- The MATLAB interface is very customisable, adjust it to suit
you
- Use the command window for quick tasks like exploring data, testing,
etc.
- Use the editor for developing code you want to persist between
sessions
- Variables are the main way we access and use data in MATLAB
- Variables can store many types of data including multidimensional
data
- Creating multidimensional arrays is done with square brackets
- Use functions to create, edit and operate on variables
- Operations are used to perform simple mathematical functions
- help and docs are valuable tools for understanding functions
- Figures in MATLAB are by default interactive
- Hold on is needed to place multiple plots on the same figure
- Label and title your plots for extra clarity
- The result of a relational operator is a logical array
- if, elseif and else can be used to create powerful conditions
- Logical arrays can be used to index variables
- Use for loops for when you know how many iterations to loop, while
loops when you don’t
- Break and continue allow you to exit or skip loops
- Use indents to keep looped code clear