format compact
syms x y z
help atan
ATAN Inverse tangent, result in radians.
ATAN(X) is the arctangent of the elements of X.
See also atan2, tan, atand.
Overloaded functions or methods (ones with the same name in other directories)
help sym/atan.m
Reference page in Help browser
doc atan
diff(atan(y/x),x)
ans =
-y/x^2/(1+y^2/x^2)
help symbolic
Symbolic Math Toolbox
Version 3.1.4 (R2006a) 03-Feb-2006
Calculus.
diff - Differentiate.
int - Integrate.
limit - Limit.
taylor - Taylor series.
jacobian - Jacobian matrix.
symsum - Summation of series.
Linear Algebra.
diag - Create or extract diagonals.
triu - Upper triangle.
tril - Lower triangle.
inv - Matrix inverse.
det - Determinant.
rank - Rank.
rref - Reduced row echelon form.
null - Basis for null space.
colspace - Basis for column space.
eig - Eigenvalues and eigenvectors.
svd - Singular values and singular vectors.
jordan - Jordan canonical (normal) form.
poly - Characteristic polynomial.
expm - Matrix exponential.
mldivide - \ matrix left division.
mpower - ^ matrix power.
mrdivide - / matrix right division.
mtimes - * matrix multiplication.
transpose - .' matrix transpose.
ctranspose - ' matrix complex conjugate transpose.
Simplification.
simplify - Simplify.
expand - Expand.
factor - Factor.
collect - Collect.
simple - Search for shortest form.
numden - Numerator and denominator.
horner - Nested polynomial representation.
subexpr - Rewrite in terms of subexpressions.
coeffs - Coefficients of a multivariate polynomial.
sort - Sort symbolic vectors or polynomials.
subs - Symbolic substitution.
Solution of Equations.
solve - Symbolic solution of algebraic equations.
dsolve - Symbolic solution of differential equations.
finverse - Functional inverse.
compose - Functional composition.
Variable Precision Arithmetic.
vpa - Variable precision arithmetic.
digits - Set variable precision accuracy.
Integral Transforms.
fourier - Fourier transform.
laplace - Laplace transform.
ztrans - Z transform.
ifourier - Inverse Fourier transform.
ilaplace - Inverse Laplace transform.
iztrans - Inverse Z transform.
Conversions.
double - Convert symbolic matrix to double.
single - Convert symbolic matrix to single precision.
poly2sym - Coefficient vector to symbolic polynomial.
sym2poly - Symbolic polynomial to coefficient vector.
char - Convert sym object to string.
int8 - Convert to signed 8-bit integers.
int16 - Convert to signed 16-bit integers.
int32 - Convert to signed 32-bit integers.
int64 - Convert to signed 64-bit integers.
uint8 - Convert to unsigned 8-bit integers.
uint16 - Convert to unsigned 16-bit integers.
uint32 - Convert to unsigned 32-bit integers.
uint64 - Convert to unsigned 64-bit integers.
Symbolic Operations.
sym - Create symbolic object.
syms - Short-cut for constructing symbolic objects.
findsym - Determine symbolic variables.
pretty - Pretty print a symbolic expression.
latex - LaTeX representation of a symbolic expression.
texlabel - Produces the TeX format from a character string.
ccode - C code representation of a symbolic expression.
fortran - FORTRAN representation of a symbolic expression.
Arithmetic and Algebraic Operations.
plus - + addition.
minus - - subtraction.
uminus - - negation.
times - .* array multiplication.
ldivide - \ left division.
rdivide - / right division.
power - .^ array power.
abs - Absolute value.
ceil - Ceiling.
conj - Conjugate.
colon - Colon operator.
fix - Integer part.
floor - Floor.
frac - Fractional part.
mod - Mod.
round - Round.
quorem - Quotient and remainder.
imag - Imaginary part.
real - real part.
exp - Exponential.
log - Natural logarithm.
log10 - Common logarithm.
log2 - Base-2 logarithm.
sqrt - Square root.
prod - Product of the elements.
sum - Sum of the elements.
Logical Operations.
isreal - True for real array
eq - Equality test.
ne - Inequality test.
Special Functions.
besseli - Bessel function, I.
besselj - Bessel function, J.
besselk - Bessel function, K.
bessely - Bessel function, Y.
erf - Error function.
sinint - Sine integral.
cosint - Cosine integral.
zeta - Riemann zeta function.
gamma - Symbolic gamma function.
gcd - Greatest common divisor.
lcm - Least common multiple.
hypergeom - Generalized hypergeometric function.
lambertw - Lambert W function.
dirac - Delta function.
heaviside - Step function.
Trigonometric Functions.
acos - Inverse cosine.
acosh - Inverse hyperbolic cosine.
acot - Inverse cotangent.
acoth - Inverse hyperbolic cotangent.
acsc - Inverse cosecant.
acsch - Inverse hyperbolic cosecant.
asec - Inverse secant.
asech - Inverse hyperbolic secant.
asin - Inverse sine.
asinh - Inverse hyperbolic sine.
atan - Inverse tangent.
atanh - Inverse hyperbolic tangent.
cos - Cosine function.
cosh - Hyperbolic cosine.
cot - Cotangent.
coth - Hyperbolic cotangent.
csc - Cosecant.
csch - Hyperbolic cosecant.
sec - Secant.
sech - Hyperbolic sechant.
sin - Sine function.
sinh - Hyperbolic sine.
tan - Tangent function.
tanh - Hyperbolic tangent.
String handling utilities.
isvarname - Check for a valid variable name (MATLAB Toolbox).
vectorize - Vectorize a symbolic expression.
disp - Displays a sym as text.
display - Display function for syms.
eval - Evaluate a symbolic expression.
Pedagogical and Graphical Applications.
rsums - Riemann sums.
ezcontour - Easy to use contour plotter.
ezcontourf - Easy to use filled contour plotter.
ezmesh - Easy to use mesh (surface) plotter.
ezmeshc - Easy to use combined mesh/contour plotter.
ezplot - Easy to use function, implicit, and parametric curve plotter.
ezplot3 - Easy to use spatial curve plotter.
ezpolar - Easy to use polar coordinates plotter.
ezsurf - Easy to use surface plotter.
ezsurfc - Easy to use combined surface/contour plotter.
funtool - Function calculator.
taylortool - Taylor series calculator.
Demonstrations.
symintro - Introduction to the Symbolic Toolbox.
symcalcdemo - Calculus demonstration.
symlindemo - Demonstrate symbolic linear algebra.
symvpademo - Demonstrate variable precision arithmetic
symrotdemo - Study plane rotations.
symeqndemo - Demonstrate symbolic equation solving.
Access to Maple.
maple - Access Maple kernel. (Not available with Student Version.)
mfun - Numeric evaluation of Maple functions.
mfunlist - List of functions for MFUN.
mhelp - Maple help. (Not available with Student Version.)
procread - Install a Maple procedure. (Requires Extended Toolbox.)
ans
ans =
-y/x^2/(1+y^2/x^2)
simplify(ans)
ans =
-y/(x^2+y^2)
help diff
DIFF Difference and approximate derivative.
DIFF(X), for a vector X, is [X(2)-X(1) X(3)-X(2) ... X(n)-X(n-1)].
DIFF(X), for a matrix X, is the matrix of row differences,
[X(2:n,:) - X(1:n-1,:)].
DIFF(X), for an N-D array X, is the difference along the first
non-singleton dimension of X.
DIFF(X,N) is the N-th order difference along the first non-singleton
dimension (denote it by DIM). If N >= size(X,DIM), DIFF takes
successive differences along the next non-singleton dimension.
DIFF(X,N,DIM) is the Nth difference function along dimension DIM.
If N >= size(X,DIM), DIFF returns an empty array.
Examples:
h = .001; x = 0:h:pi;
diff(sin(x.^2))/h is an approximation to 2*cos(x.^2).*x
diff((1:10).^2) is 3:2:19
If X = [3 7 5
0 9 2]
then diff(X,1,1) is [-3 2 -3], diff(X,1,2) is [4 -2
9 -7],
diff(X,2,2) is the 2nd order difference along the dimension 2, and
diff(X,3,2) is the empty matrix.
See also gradient, sum, prod.
Overloaded functions or methods (ones with the same name in other directories)
help iddata/diff.m
help sym/diff.m
help char/diff.m
Reference page in Help browser
doc diff
help sym/diff
DIFF Differentiate.
DIFF(S) differentiates a symbolic expression S with respect to its
free variable as determined by FINDSYM.
DIFF(S,'v') or DIFF(S,sym('v')) differentiates S with respect to v.
DIFF(S,n), for a positive integer n, differentiates S n times.
DIFF(S,'v',n) and DIFF(S,n,'v') are also acceptable.
Examples;
x = sym('x');
t = sym('t');
diff(sin(x^2)) is 2*cos(x^2)*x
diff(t^6,6) is 720.
See also INT, JACOBIAN, FINDSYM.
simplify(diff(atan(y/x),x,2))
ans =
2*y*x/(x^2+y^2)^2
simplify(diff(diff(atan(y/x),x),y))
ans =
-(x^2-y^2)/(x^2+y^2)^2
simplify(diff(1/sqrt(x^2+y^2+z^2),x,2))
ans =
(2*x^2-y^2-z^2)/(x^2+y^2+z^2)^(5/2)
load X Z Y;
surf(X,Y,Z);
??? Undefined function or variable 'X'.
load X;
surf(X,Y,Z);
x
x =
Columns 1 through 8
-5.0000 -4.5000 -4.0000 -3.5000 -3.0000 -2.5000 -2.0000 -1.5000
Columns 9 through 16
-1.0000 -0.5000 0 0.5000 1.0000 1.5000 2.0000 2.5000
Columns 17 through 24
3.0000 3.5000 4.0000 4.5000 5.0000 5.5000 6.0000 6.5000
Columns 25 through 27
7.0000 7.5000 8.0000
clear all
syms x y z
simplify(diff(log((4+x)/y^2),y))
ans =
-2/y
simplify(diff(x^(xy),x))
??? Undefined function or variable 'xy'.
simplify(diff(x^(x*y),x))
ans =
x^(x*y)*y*(log(x)+1)
simplify(diff(sqrt(sin(x)^2+sin(y)^2+sin(z)^2),x))
ans =
1/(3-cos(x)^2-cos(y)^2-cos(z)^2)^(1/2)*sin(x)*cos(x)
help eval
EVAL Execute string with MATLAB expression.
EVAL(s), where s is a string, causes MATLAB to execute
the string as an expression or statement.
[X,Y,Z,...] = EVAL(s) returns output arguments from the
expression in string s.
The input strings to EVAL are often created by
concatenating substrings and variables inside square
brackets. For example:
Generate a sequence of matrices named M1 through M12:
for n = 1:12
eval(['M' num2str(n) ' = magic(n)'])
end
Run a selected M-file script.
D = {'odedemo'; 'sunspots'; 'fitdemo'};
n = input('Select a demo number: ');
eval(D{n})
See also feval, evalin, assignin, evalc, lasterr.
Overloaded functions or methods (ones with the same name in other directories)
help opaque/eval.m
help sym/eval.m
Reference page in Help browser
doc eval
help sym/feval
Searching class methods ... 16% (type ctrl-C to stop)Searching class methods ... 17% (type ctrl-C to stop)Searching class methods ... 18% (type ctrl-C to stop)Searching class methods ... 19% (type ctrl-C to stop)Searching class methods ... 20% (type ctrl-C to stop)Searching class methods ... 21% (type ctrl-C to stop)Searching class methods ... 22% (type ctrl-C to stop)Searching class methods ... 23% (type ctrl-C to stop)Searching class methods ... 24% (type ctrl-C to stop)Searching class methods ... 25% (type ctrl-C to stop)Searching class methods ... 26% (type ctrl-C to stop)Searching class methods ... 27% (type ctrl-C to stop)Searching class methods ... 28% (type ctrl-C to stop)Searching class methods ... 29% (type ctrl-C to stop)Searching class methods ... 30% (type ctrl-C to stop)Searching class methods ... 31% (type ctrl-C to stop)Searching class methods ... 32% (type ctrl-C to stop)Searching class methods ... 33% (type ctrl-C to stop)Searching class methods ... 34% (type ctrl-C to stop)Searching class methods ... 35% (type ctrl-C to stop)Searching class methods ... 36% (type ctrl-C to stop)Searching class methods ... 37% (type ctrl-C to stop)Searching class methods ... 38% (type ctrl-C to stop)Searching class methods ... 39% (type ctrl-C to stop)Searching class methods ... 40% (type ctrl-C to stop)Searching class methods ... 41% (type ctrl-C to stop)Searching class methods ... 42% (type ctrl-C to stop)Searching class methods ... 43% (type ctrl-C to stop)Searching class methods ... 44% (type ctrl-C to stop)Searching class methods ... 45% (type ctrl-C to stop)Searching class methods ... 46% (type ctrl-C to stop)Searching class methods ... 47% (type ctrl-C to stop)Searching class methods ... 48% (type ctrl-C to stop)Searching class methods ... 49% (type ctrl-C to stop)Searching class methods ... 50% (type ctrl-C to stop)Searching class methods ... 51% (type ctrl-C to stop)Searching class methods ... 52% (type ctrl-C to stop)Searching class methods ... 53% (type ctrl-C to stop)Searching class methods ... 54% (type ctrl-C to stop)Searching class methods ... 55% (type ctrl-C to stop)Searching class methods ... 56% (type ctrl-C to stop)Searching class methods ... 57% (type ctrl-C to stop)Searching class methods ... 58% (type ctrl-C to stop)Searching class methods ... 59% (type ctrl-C to stop)Searching class methods ... 60% (type ctrl-C to stop)Searching class methods ... 61% (type ctrl-C to stop)Searching class methods ... 62% (type ctrl-C to stop)Searching class methods ... 63% (type ctrl-C to stop)Searching class methods ... 64% (type ctrl-C to stop)Searching class methods ... 65% (type ctrl-C to stop)Searching class methods ... 66% (type ctrl-C to stop)Searching class methods ... 67% (type ctrl-C to stop)Searching class methods ... 68% (type ctrl-C to stop)Searching class methods ... 69% (type ctrl-C to stop)Searching class methods ... 70% (type ctrl-C to stop)Searching class methods ... 71% (type ctrl-C to stop)Searching class methods ... 72% (type ctrl-C to stop)Searching class methods ... 73% (type ctrl-C to stop)Searching class methods ... 74% (type ctrl-C to stop)Searching class methods ... 75% (type ctrl-C to stop)Searching class methods ... 76% (type ctrl-C to stop)Searching class methods ... 77% (type ctrl-C to stop)Searching class methods ... 78% (type ctrl-C to stop)Searching class methods ... 79% (type ctrl-C to stop)Searching class methods ... 80% (type ctrl-C to stop)Searching class methods ... 81% (type ctrl-C to stop)Searching class methods ... 82% (type ctrl-C to stop)Searching class methods ... 83% (type ctrl-C to stop)Searching class methods ... 84% (type ctrl-C to stop)Searching class methods ... 85% (type ctrl-C to stop)Searching class methods ... 86% (type ctrl-C to stop)Searching class methods ... 87% (type ctrl-C to stop)Searching class methods ... 88% (type ctrl-C to stop)Searching class methods ... 89% (type ctrl-C to stop)Searching class methods ... 90% (type ctrl-C to stop)Searching class methods ... 91% (type ctrl-C to stop)Searching class methods ... 92% (type ctrl-C to stop)Searching class methods ... 93% (type ctrl-C to stop)Searching class methods ... 94% (type ctrl-C to stop)Searching class methods ... 95% (type ctrl-C to stop)Searching class methods ... 96% (type ctrl-C to stop)Searching class methods ... 97% (type ctrl-C to stop)Searching class methods ... 98% (type ctrl-C to stop)Searching class methods ... 99% (type ctrl-C to stop)
sym/feval.m not found.
Use the Help browser Search tab to search the documentation, or
type "help help" for help command options, such as help for methods.
v=simplify(diff(sqrt(sin(x)^2+sin(y)^2+sin(z)^2),x))
v =
1/(3-cos(x)^2-cos(y)^2-cos(z)^2)^(1/2)*sin(x)*cos(x)
x=0;
y-0;
y=0;
z=pi/4
z =
0.7854
eval(v)
ans =
0
v=simplify(diff(sqrt(sin(x)^2+sin(y)^2+sin(z)^2),z))
??? Error using ==> diff
Difference order N must be a positive integer scalar.
syms x y z
v=simplify(diff(sqrt(sin(x)^2+sin(y)^2+sin(z)^2),z))
v =
1/(3-cos(x)^2-cos(y)^2-cos(z)^2)^(1/2)*sin(z)*cos(z)
x=0;
z=pi/4
z =
0.7854
y=0;
eval(v)
ans =
0.7071
1/sqrt(2)
ans =
0.7071
diary off