MATLAB Onramp Quick Reference
MATLAB Onramp Quick Reference
MATLAB Onramp
Conclusion
Summary
Summary of MATLAB Onramp
https://matlabacademy.mathworks.com/artifacts/quick-reference.html?course=gettingstarted&language=en&release=R2024a 1/4
10/13/24, 10:59 AM MATLAB Onramp - Quick Reference
Basic Syntax
Example Description
Desktop Management
Function Example Description
format format long Change how numeric output appears in the Command Window.
Array Types
Example Description
4 scalar
[3 5] row vector
[3 4 5; 6 7 8] matrix
linspace(1,10,5) Create a vector with 5 elements. The values are evenly spaced from 1 to
10 .
Matrix Creation
Example Description
Array Indexing
https://matlabacademy.mathworks.com/artifacts/quick-reference.html?course=gettingstarted&language=en&release=R2024a 2/4
10/13/24, 10:59 AM MATLAB Onramp - Quick Reference
Array Indexing
Example Description
A(end,2) Access the element in the second column of the last row.
Array Operations
Example Description
Multiple Outputs
Example Description
[xMax,idx] = max(x) Calculate the maximum value of x and its corresponding index
value.
Documentation
Example Description
doc randi Open the documentation page for the randi function.
Plots
Example Description
https://matlabacademy.mathworks.com/artifacts/quick-reference.html?course=gettingstarted&language=en&release=R2024a 3/4
10/13/24, 10:59 AM MATLAB Onramp - Quick Reference
hold off Create new axes for the next plotted line.
Tables
Example Description
Logical Indexing
Example Description
x(x==999) = 1 Replace all values in x that are equal to 999 with the value 1 .
Programming
Example Description
https://matlabacademy.mathworks.com/artifacts/quick-reference.html?course=gettingstarted&language=en&release=R2024a 4/4