Intro SAS
Intro SAS
Intro SAS
Desktop Tools :
1) Command Window: Use the Command Window to enter variables and run
functions and M-files.
2) Command History: Statements you enter in the Command Window are logged in
the Command History. In the Command History, you can view previously run
statements, and copy and execute selected statements.
3) Current Directory Browser: MATLAB file operations use the current directory
reference point. Any file you want to run must be in the current directory or on the
search path.
4) Workspace: The MATLAB workspace consists of the set of variables (named arrays)
built up during a MATLAB session and stored in memory.
5) Editor/Debugger: The MATLAB Editor allows you to create, edit, and debug script
and function files. It provides a more structured environment for writing code with
features like syntax highlighting and debugging tools.
6) Plotting Tools: MATLAB offers a wide range of plotting and visualization tools,
including the Plotting Editor, which allows you to create various types of plots and
customize them to visualize your data effectively.
Basic Commands:
• clear Command: Removes all variables from workspace.
• clc Command: Clears the Command window and homes the cursor.
• help Command: help displays help about that Topic if it exist.
• lookfor Command: Provides help by searching through all the first lines of MATLAB
help topics and returning those that contains a key word you specify.
• edit Command: enable you to edit (open) any M-file in Editor Window. This command
doesn’t open built-in function like, sqrt. See also type Command.
• save Command: Allows you to save variables from the workspace to a file for future
use. For example, save mydata.mat x y saves variables x and y to a file named
"mydata.mat."
• more command: more on enables paging of the output in the MATLAB command
window, and more off disables paging of the output in the MATLAB command window.
Notes:
• A semicolon " ; " at the end of a MATLAB statement suppresses printing of results.
• If a statement does not fit on one line, use " . . . ", followed by Enter to indicate that
the statement continues on the next line.
For example: >> S= sqrt (225)*30 /...
(20*sqrt (100)
• If we don’t specify an output variable, MATLAB uses the variable ans (short for
answer), to store the last results of a calculation.
• Use Up arrow and Down arrow to edit previous commands you entered in Command
Window. • Insert " % " before the statement that you want to use it as comment; the
statement will appear in green color.