Lecture 1
Lecture 1
Lecture 1
1-1 Introduction
To end your MATLAB session, select Exit MATLAB from the File menu in the
desktop, or type quit (or exit) in the Command Window, or with easy way by
click on close button in control box.
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.
1
Experiment No. Introduction to
Current Directory Browser Command Window
Workspace
Command
History
2
Experiment No. (1) Introduction to MATLAB
1-2 Basic Commands
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:
3
Experiment No. Introduction to
>> a=3
>> a=3; can you see the effect of semicolon " ; "
>> clear a
>> b
Exercises
1- Use edit command to edit the dct function, then try to edit sin function. State the
difference.