MATLAB Commands
MATLAB Commands
Home
MATLAB Commands
Programming
Java
Web
Databases
Academic
Management
Quality
Telecom
More...
MATLAB - Commands
Advertisements
Previous Page
Next Pag
MATLAB is an interactive program for numerical computation and data visualization. You can
command by typing it at the MATLAB prompt '>>' on the Command Window.
MATLAB Basics
MATLAB - Home
MATLAB - Overview
MATLAB - Environment
MATLAB - Syntax
MATLAB - Variables
MATLAB - Commands
MATLAB - M-Files
MATLAB - Data Types
MATLAB - Operators
MATLAB - Decisions
MATLAB - Loops
MATLAB - Vectors
MATLAB - Matrics
MATLAB - Arrays
MATLAB - Colon Notation
MATLAB - Numbers
MATLAB - Strings
MATLAB - Functions
MATLAB - Data Import
In this section, we will provide lists of commonly used general MATLAB commands.
MATLAB provides various commands for managing a session. The following table provides
commands:
Command
Purpose
clc
clear
exist
global
help
lookfor
quit
Stops MATLAB.
who
whos
MATLAB provides various useful commands for working with the system, like saving the curren
the workspace as a file and loading the file later.
It also provides various commands for other system-related activities like, displaying date, listin
the directory, displaying current directory, etc.
The following table displays some commonly used system-related commands:
Purpose
MATLAB Advanced
cd
MATLAB - Plotting
date
MATLAB - Graphics
delete
Deletes a file.
http://www.tutorialspoint.com/matlab/matlab_commands.htm
1/5
11/14/2014
MATLAB Commands
MATLAB - Algebra
diary
MATLAB - Calculus
dir
MATLAB - Differential
load
MATLAB - Integration
path
MATLAB - Polynomials
pwd
MATLAB - Transforms
save
type
MATLAB - Simulink
what
wklread
Selected Reading
Command
Purpose
disp
fscanf
Computer Glossary
format
Who is Who
fprintf
input
The fscanf and fprintf commands behave like C scanf and printf functions. They support the
format codes:
Format Code
Purpose
%s
Format as a string.
%d
Format as an integer.
%f
%e
%g
\n
\t
The format function has the following forms used for numeric display:
Format Function
Display up to
format short
format long
16 decimal digits.
format short e
format long e
format bank
http://www.tutorialspoint.com/matlab/matlab_commands.htm
2/5
11/14/2014
MATLAB Commands
format +
format rat
Rational approximation.
format compact
format loose
The following table shows various commands used for working with arrays, matrices and vector
Command
Purpose
cat
Concatenates arrays.
find
length
linspace
logspace
max
min
prod
reshape
Changes size.
size
sort
sum
eye
ones
zeros
cross
dot
det
inv
pinv
rank
rref
cell
celldisp
cellplot
num2cell
deal
iscell
http://www.tutorialspoint.com/matlab/matlab_commands.htm
3/5
11/14/2014
MATLAB Commands
Plotting Commands
MATLAB provides numerous commands for plotting graphs. The following table shows som
commonly used commands for plotting:
Command
Purpose
axis
fplot
grid
Displays gridlines.
plot
Generates xy plot.
title
xlabel
ylabel
axes
close
close all
figure
gtext
hold
legend
refresh
set
subplot
text
bar
loglog
polar
semilogx
semilogy
stairs
stem
Previous Page
Print Version
PDF Version
Next Pag
Advertisements
http://www.tutorialspoint.com/matlab/matlab_commands.htm
4/5
11/14/2014
MATLAB Commands
ASP.NET | jQuery | AJAX | ANT | JSP | Servlets | log4j | iBATIS | Hibernate | JDBC | Struts | HTML5
http://www.tutorialspoint.com/matlab/matlab_commands.htm
5/5