
Running Functions and Programs, and Entering Variables
Running Functions and Programs, and Entering Variables
In this section...
“Running Statements at the Command Line Prompt” on page 3-7
“Running External Programs” on page 3-9
“Evaluating or Opening a S electio n” on page 3-12
“Displaying Hyperlinks in the Command Window” on page 3-13
Running Statements at the Command Line Prompt
Entering Variables and Runn ing Functions
At the prompt, enter data and run functions. For example, to create A,a
3-by-3 matrix, type
A=[123;456;7810]
When you press the Enter or Return key after typing the line, MATLAB
responds with
A=
123
456
7810
To run a function, type the function including all arguments and press En ter
or Return. MATLAB displays the result. For example, type
magic(2)
and MATLAB returns
ans =
13
42
3-7
Commentaires sur ces manuels