Graphics Programs Reference
In-Depth Information
:
Rangeoperator,usedfordefiningvectorsandmatrices.Type
help colon
formore
information.
'
Complex conjugate transpose of a matrix. See
ctranspose
. Also delimits the
beginning and end of a string.
;
SuppressesoutputofaMATLABcommand,andcanbeusedtoseparatecommands
on a command line. Also used to separate the rows of a matrix or column vector.
X = 0:0.1:30;
[1; 2; 3]
,
Separates elements of a row of a matrix, or arguments to a command. Can also be
used to separate commands on a command line.
.'
Transpose of a matrix. See
transpose
.
...
Line continuation operator. Cannot be used inside quoted strings. Type
help
punct
for more information.
1+3+5+7+9+11...
+13+15+17
['This is a way to create very long strings ', ...
'that span more than one line. Note the square brackets.']
!
Run command from operating system.
!C:
\
Programs
\
program.bat
%
Comment. MATLAB will ignore the rest of the same line.
@
Creates a function handle.
fminbnd(@cos, 0, 2*pi)
Built-in Constants
eps
Roughly the size of the computer's floating point round-off error; on most
computers it is around 2
10
−
16
.
×
exp(1)
e
=
2
.
71828
...
. Note that
e
has no special meaning.
=
√
−
i
i
1. This assignment can be overridden, for example, if you want to use
i
as
an index in a
for
loop. In that case
j
can be used for the imaginary unit.
Inf
∞
. Also
inf
(in lower-case letters).
NaN
Not a number. Used for indeterminate expressions suchas 0
/
0.
π
=
3
.
14159
....
pi
Search WWH ::
Custom Search