Graphics Programs Reference
In-Depth Information
MATLAB Commands
addpath
Adds the specified directory to MATLAB's file search path.
addpath C:
\
my
--
mfiles
ans
A variable holding the value of the most recent unassigned output.
cd
Makes the specified directory the current (working) directory.
cd C:
\
mydocs
\
mfiles
char
Converts a symbolic expression to a string. Useful for defining inline functions.
syms x y
f = inline(char(sin(x)*sin(y)))
clear
Clears values and definitions for variables and functions. If you specify one
or more variables, then only those variables are cleared.
clear
clear f g
collect
Collects coefficients of powers of the specified symbolic variable in a given
symbolic expression.
syms x y
collect(xˆ2 - 2*xˆ2 + 3*x + x*y, x)
compose
Composition of functions.
syms x y; f = exp(x); g = sin(y); h = compose(f, g)
ctranspose
Conjugate transpose of a matrix. Usually invoked withthe
'
operator.
Equivalent to
transpose
for real matrices.
A=[13i]
A'
D
NotatrueMATLABcommand.Usedin
dsolve
todenotedifferentiation.See
diff
.
dsolve('x*Dy + y = sin(x)', 'x')
delete
Deletes a file.
delete <filename>
det
The determinant of a matrix.
det([1 3; 4 5])
diag
Gives a square matrix witha prescribed diagonal vector, or picks out te
diagonal in a square matrix.
V = [2 3 4 5]; diag(V)
X = [2 3; 4 5]; diag(X)
Search WWH ::
Custom Search