Summary of MATLAB Onramp
Basic syntax
Example | Description |
|---|---|
Create variables with the equal sign ( The left-side ( | |
You can provide inputs to a function using parentheses. |
Desktop management
Fonction | Example | Description |
|---|---|---|
| Save your current workspace to a MAT-file. | |
| Load the variables in a MAT-file to the Workspace. | |
| Clear all variables from the Workspace. | |
| Clear all text from the Command Window. | |
| Change how numeric output is displayed. |
Array types
Example | Description |
|---|---|
| scalar |
| row vector |
| column vector |
| matrix |
Evenly-spaced vectors
Creating matrices
Indexing
Example | Description |
|---|---|
| Access the element in the second column of the last row. |
| Access the entire second row |
| Access all columns of the first three rows. |
| Change the value of the second element an array to |
Array operations
Example | Description |
|---|---|
| Perform matrix multiplication. |
| Perform element-wise multiplication. |
Multiple outputs
Example | Description |
|---|---|
[ | Save the number of rows and columns in |
| Calculate the maximum value of |
Documentation
Example | Description |
|---|---|
| Open the documentation page for the |
Plotting
Using tables
Example | Description |
|---|---|
Extract the variable | |
| Derive a table variable from existing data. |
Logicals
Example | Description |
|---|---|
Compare a vector to the value | |
Extract all elements in | |
| Replace all values in |