<< Chapter < Page Chapter >> Page >
  • Trial>> indicates that the Command Window is in normal mode and the MATLAB license will expire after the trial period ends.
  • EDU>> indicates that the Command Window is in normal mode, in MATLAB Student Version.
  • >> indicates that the Command Window is in normal mode.

The Command Window.
The Command Window.

Command history

The Command History is a log of the commands we have executed in the command window.

The Command History.
The Command History.


The workspace consists of a set of variables stored in memory during a MATLAB session. To open the Workspace browser, select Desktop>Workspace in the MATLAB desktop, or type


at the Command Window prompt.


Current folder

The Current Folder is like the Finder in Mac OS X or Windows Explorer in Windows operating systems and allows us to browse through the files and folders. The Current Folder also displays details about files in your current directory and within the hierarchy of the folders it contains.

Current Folder
Current Folder.

Current Folder docked on the desktop.

Tool strip

The tool strip contains global tabs, Home, Plots and Apps. Contextual tabs become available when you need them.


The plots tab allows us to plot various types of graphs quickly and easily.

The plots tab.

The apps tab gives quick access to interactive applications within MATLAB environment.

The apps tab.

Layout button allows us to change the desktop layout or go back to the default configuration.

Desktop Layout
Layout button.


The MATLAB toolbar provides on-screen buttons to access frequently used features such as, copy, paste, undo and redo.

Tool Bar

Keyboard shortcuts

MATLAB provides keyboard shortcuts for viewing a history of commands and listing contextual help.

  1. The up arrow key,
  2. The tab key,
  3. The semicolon symbol.

The up arrow key

Suppose we want to enter the following equation:


But we mistakenly entered


MATLAB returns the following prompt:

??? Undefined function or method 'sine' for input arguments of type 'double'.

Instead of retyping the equation, press the up arrow key, the mistakenly entered line is displayed. Using the left arrow key, move the cursor to the misspelled letter. Make the correction and press Return or Enter to execute the command.

Pressing the up arrow key repeatedly recalls the previously entered commands. Likewise, typing the first characters of previously entered line and pressing the up arrow key displays the full command line. To execute that line, simply press the Return or Enter key.

The tab key

Suppose you forgot how to enter the square root command. Begin typing y=sq in the command prompt:


Then press the tab key and scroll down to sqrt . Select it and press Return or Enter key.


The semicolon symbol

The semicolon symbol at the end of a line suppresses the screen output. This is useful when you want to keep your command window clean.

Type the following entry and press the Return key:


The following output is displayed:

y = 4

Now, press the up arrow key to recall our initial entry


And insert a semicolon as follows:


No numerical result is displayed however MATLAB stores the value of y in the memory. We can recall the value y by simply typing y and pressing Return.

Matlab help

MATLAB comes with three forms of online help: help, doc and demos.


Typing help in the Command Window lists all primary help topics. You can display a topic by clicking on the link.



Or if you know the command or function you need help with, you can type help followed by the command or function. For example to learn about clc command, type help clc at the command prompt:

>>help clc

Help CLC
The output of >>help clc command.

Also try the following command: >>help clear

Help Clear
The output of >>help clear command.

To learn about sine function, type help sin at the command prompt:

>>help sin


Obviously, to use help effectively, you need to know what you are looking for. Often times, especially when you first start learning an application, it is usually difficult to ask the right questions. In the case of MATLAB, doc command is generally better than help . If you type doc in the command prompt, MATLAB opens a browser from where you can obtain help easier:


Built-in MATLAB Documentation.

Like using help sin , try typing doc sin in the command prompt:

>>doc sin


You can learn more about MATLAB through demos by typing demo in the command prompt, a list of links to demos will open in Help Browser. Demos and online seminars are available at product demos and online seminars .


Built-in MATLAB Demos.

Useful commands and functions

For a detailed explanation and examples for each of the following type ‘help function’ (without quotes) at the MATLAB prompt.

Useful commands and functions
Command/Function Meaning
clc Clear Command Window
clear Remove items from workspace
who, whos List variables in workspace
workspace Display Workspace browser
cd Change working directory
pwd Display current directory
computer Identify information about computer on which MATLAB is running
ver Display version information for MathWorks products
quit Terminate MATLAB
exit Terminate MATLAB (same as quit)

Summary of key points

  1. MATLAB is a popular technical computing application and MathWorks offers a trial version of MATLAB on their website,
  2. The MATLAB Desktop consists of Command Window, Command History, Workspace, Current Folder and Start Button,
  3. The up/down arrow keys, the tab key and the semicolon are convenient tools to use the Command Window,
  4. MATLAB features an online help, doc and demo,
  5. Various commands and functions make MATLAB experience easier, for example, clc, clear and exit .

Questions & Answers

where we get a research paper on Nano chemistry....?
Maira Reply
what are the products of Nano chemistry?
Maira Reply
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Preparation and Applications of Nanomaterial for Drug Delivery
Hafiz Reply
Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
Jyoti Reply
I only see partial conversation and what's the question here!
Crow Reply
what about nanotechnology for water purification
RAW Reply
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
yes that's correct
I think
Nasa has use it in the 60's, copper as water purification in the moon travel.
nanocopper obvius
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
scanning tunneling microscope
how nano science is used for hydrophobicity
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
what is differents between GO and RGO?
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
analytical skills graphene is prepared to kill any type viruses .
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
The nanotechnology is as new science, to scale nanometric
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
what school?
biomolecules are e building blocks of every organics and inorganic materials.
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, A brief introduction to engineering computation with matlab. OpenStax CNX. Nov 17, 2015 Download for free at http://legacy.cnx.org/content/col11371/1.11
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'A brief introduction to engineering computation with matlab' conversation and receive update notifications?