0% found this document useful (0 votes)
22 views

MAT LAB Commands

Operators and special characters provide essential functions in MATLAB. They include arithmetic operators like plus, minus, and matrix multiplication. Relational operators compare values like equal, less than, and greater than. Logical operators perform operations on Boolean arrays and special characters define syntax elements such as parentheses, brackets, and colon.

Uploaded by

Ali Baig
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

MAT LAB Commands

Operators and special characters provide essential functions in MATLAB. They include arithmetic operators like plus, minus, and matrix multiplication. Relational operators compare values like equal, less than, and greater than. Logical operators perform operations on Boolean arrays and special characters define syntax elements such as parentheses, brackets, and colon.

Uploaded by

Ali Baig
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

help ops

- Operators and special characters.

Arithmetic operators.
plus
- Plus
uplus
- Unary plus
minus
- Minus
uminus - Unary minus
mtimes - Matrix multiply
times
- Array multiply
mpower - Matrix power
power - Array power
mldivide - Backslash or left matrix divide
mrdivide - Slash or right matrix divide
ldivide - Left array divide
rdivide - Right array divide

+
+
*
.*
^
.^
\
/
.\
./

Relational operators.
eq
ne
lt
gt
le
ge

- Equal
- Not equal
- Less than
- Greater than
- Less than or equal
- Greater than or equal

==
~=
<
>
<=
>=

Logical operators.
relop
- Short-circuit logical AND
&&
relop
- Short-circuit logical OR
||
and
- Element-wise logical AND
&
or
- Element-wise logical OR
|
not
- Logical NOT
~
xor
- Logical EXCLUSIVE OR
any
- True if any element of vector is nonzero
all
- True if all elements of vector are nonzero
Special characters.
colon
paren
paren
paren
punct
punct
punct

- Colon
:
- Parentheses and subscripting
()
- Brackets
[]
- Braces and subscripting
{}
- Function handle creation
@
- Decimal point
.
- Structure field access
.

punct
- Parent directory
..
punct
- Continuation
...
punct
- Separator
,
punct
- Semicolon
;
punct
- Comment
%
punct
- Invoke operating system command !
punct
- Assignment
=
punct
- Quote
'
transpose - Transpose
.'
ctranspose - Complex conjugate transpose
'
horzcat - Horizontal concatenation
[,]
vertcat - Vertical concatenation
[;]
subsasgn - Subscripted assignment
( ),{ },.
subsref - Subscripted reference
( ),{ },.
subsindex - Subscript index
metaclass - Metaclass for MATLAB class
?
2. help matfun
Matrix functions - numerical linear algebra.
Matrix analysis.
norm
- Matrix or vector norm.
normest - Estimate the matrix 2-norm.
rank
- Matrix rank.
det
- Determinant.
trace
- Sum of diagonal elements.
null
- Null space.
orth
- Orthogonalization.
rref
- Reduced row echelon form.
subspace - Angle between two subspaces.

You might also like