Graphics Programs Reference
In-Depth Information
eye
The identity matrix of the specified size.
eye(5)
factor
Factors a polynomial.
syms x y; factor(xˆ4 - yˆ4)
feval
Evaluates a function specified by a string. Useful in function M-files.
feval('exp', 1)
find
Finds the indices of nonzero elements of a vector or matrix.
X = [2 0 5]; find(X)
fminbnd
Finds the smallest (approximate) value of a function over an interval.
fminbnd('xˆ4 - xˆ2 + 1', 0, 1)
f = inline('xˆ3 - 7*xˆ2 - 5*x + 2', 'x'); fminbnd(f, 4, 6)
format
Specifies the output format for numerical variables.
format long
fzero
Tries to find a zero of the specified function near a given starting point or on
a specified interval.
fzero(inline('cos(x) - x'), 1)
fzero(@cos, [-pi 0])
guide
Opens the GUI Design Environment.
guide mygui
help
Asks for documentation for a MATLAB command. See also
lookfor
.
help factor
inline
Constructs a MATLAB inline function from a string expression.
f = inline('xˆ5 - x'); f(3)
sol = dsolve('Dy = xˆ2 + y', 'y(0) = 2', 'x');
fsol = inline(vectorize(sol), 'x')
int
Integration operator for bothdefinite and indefinite integrals.
int('1/(1 + xˆ2)', 'x')
syms x; int(exp(-x), x, 0, Inf)
inv
Inverse of a square matrix.
inv([1 2; 3 5])
jacobian
Computes the Jacobian matrix, or for a scalar function, the symbolic gra-
dient.
syms x y; f = xˆ2*yˆ3; jacobian(f)
Search WWH ::
Custom Search