MATLAB - Commands
MATLAB - Commands
MATLAB - Commands
MATLAB is an interactive program for numerical computation and data visualization. You can
enter a command by typing it at the MATLAB prompt '>>' on the Command Window.
In this section, we will provide lists of commonly used general MATLAB commands.
Command Purpose
MATLAB provides various useful commands for working with the system, like saving the current
work in the workspace as a file and loading the file later.
It also provides various commands for other system-related activities like, displaying date, listing
files in the directory, displaying current directory, etc.
The following table displays some commonly used system-related commands −
https://www.tutorialspoint.com/matlab/matlab_commands.htm 1/7
8/21/2021 MATLAB - Commands
Command Purpose
Command Purpose
The fscanf and fprintf commands behave like C scanf and printf functions. They support the
following format codes −
https://www.tutorialspoint.com/matlab/matlab_commands.htm 2/7
8/21/2021 MATLAB - Commands
%s Format as a string.
%d Format as an integer.
The format function has the following forms used for numeric display −
The following table shows various commands used for working with arrays, matrices and
vectors −
https://www.tutorialspoint.com/matlab/matlab_commands.htm 3/7
8/21/2021 MATLAB - Commands
Command Purpose
Plotting Commands
MATLAB provides numerous commands for plotting graphs. The following table shows some of
the commonly used commands for plotting −
https://www.tutorialspoint.com/matlab/matlab_commands.htm 5/7
8/21/2021 MATLAB - Commands
Command Purpose
https://www.tutorialspoint.com/matlab/matlab_commands.htm 7/7