Top Ad unit 728 × 90

Propellerads

Latest

random
Propellerads

5 - Basic Commands

 Interactive Beginners Guide to MATLAB.

This is class #05 of Interactive Beginners Guide to MATLAB.
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.

Commands for Managing a Session

MATLAB provides various commands for managing a session. The following table provides all such commands −
CommandPurpose
clcClears command window.
clearRemoves variables from memory.
existChecks for existence of file or variable.
globalDeclares variables to be global.
helpSearches for a help topic.
lookforSearches help entries for a keyword.
quitStops MATLAB.
whoLists current variables.
whosLists current variables (long display).

Commands for Working with the System

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 −
CommandPurpose
cdChanges current directory.
dateDisplays current date.
deleteDeletes a file.
diarySwitches on/off diary file recording.
dirLists all files in current directory.
loadLoads workspace variables from a file.
pathDisplays search path.
pwdDisplays current directory.
saveSaves workspace variables in a file.
typeDisplays contents of a file.
whatLists all MATLAB files in the current directory.
wklreadReads .wk1 spreadsheet file.

Input and Output Commands

MATLAB provides the following input and output related commands −
CommandPurpose
dispDisplays contents of an array or string.
fscanfRead formatted data from a file.
formatControls screen-display format.
fprintfPerforms formatted writes to screen or file.
inputDisplays prompts and waits for input.
;Suppresses screen printing.
[post_ad]


5 - Basic Commands Reviewed by Usman Ibrahim on 06:54 Rating: 5

No comments:

All Rights Reserved by μ-Academic © 2014 - 2015
Designed by Usman Ibrahim

Contact Form

Name

Email *

Message *

Powered by Blogger.