MATLAB For Dummies
Book image
Explore Book Buy On Amazon

The following table contains a listing of commands that you use relatively often in MATLAB. You won't find every command listed — that would require a book in itself. However, these commands are usually used several times each session.

Command Purpose
cla Clears the current plot
clc Clears the Command window
clear <variable name> Removes a specific variable from the Workspace window (as specified by <variable name>)
clear all Removes all of the variables from the Workspace window
close <figure name> Closes a specific figure (as specified by <figure name>)
close all Closes all of the current figures
diary <filename> Specifies the name of the file to use for the Diary feature
diary off Stops saving the Command window text to a file
diary on Starts saving the Command window text to a file
exist <keyword> Checks whether a keyword or file is in use
format compact Removes extraneous spaces from the Command window
gca Obtains a handle to the current axes
gcf Obtains a handle to the current figure
gco Obtains a handle to the current object
get(<handle>, <property>) Obtains the <property> found in the object pointed at by <handle>
help <command or file> Displays help documentation for the <command> or comments in files you've created
iskeyword Displays a list of all the MATLAB keywords
iskeyword <name> Determines whether <name> is a keyword
load <filename> Loads the file containing variables to the Workspace window
more off Displays output using standard scrolling so that all of the output appears at one time
more on Tells MATLAB to display output one screen at a time
save <filename> Saves the variables shown in the Workspace window to the specified file
set(<handle>, <property>, <value>) Sets the <property> found in the object pointed at by <handle> to the specified <value>

About This Article

This article is from the book:

About the book authors:

John Paul Mueller is an author and technical editor with experience in application development, database management, machine learning, and deep learning. He has written hundreds of books and articles helping everyday people learn everything from networking to database management.

John Mueller has produced 114 books and more than 600 articles on topics ranging from functional programming techniques to working with Amazon Web Services (AWS). Luca Massaron, a Google Developer Expert (GDE),??interprets big data and transforms it into smart data through simple and effective data mining and machine learning techniques.

This article can be found in the category: