Chapter Nine Command Description Dblquad (Fun, A, B, C, D)
Chapter Nine Command Description Dblquad (Fun, A, B, C, D)
Command Description
dblquad(fun,a,b,c,d) Computes the double integral of the function f (x,
y) between the limits a ! x ! b and c ! y ! d.
The input fun specifies the function that
computes the integrand. It must accept a vector
argument x and scalar y, and it must return a
vector result.
Polyint(p,c) Computes the integral of the polynomial p using
an optional user-specified constant of integration
C.
Quad(fun,a,b) Uses an adaptive Simpson rule to compute the
integral of the function fun between the limits a
and b. The input fun, which represents the
integrand f (x), is a function handle for the
integrand function. It must accept a vector
argument x and return the vector result y.
quadl(fun,a,b) Uses Lobatto integration. The syntax is identical
to quad.
trapz(x,y) Uses trapezoidal integration to compute the
integral of y with respect to x, where the array y
contains the function values at the points
contained in the array x.
triplequad(fun,a,b,c,d,e,f) Computes the triple integral of the function f (x, y,
z) between the limits a ! x ! b, c ! y ! d, and
e ! y ! f. The input fun speci es the function
that computes the integrand. It must accept a
vector argument x, scalar y, and scalar z, and it
must return a vector result.
d=diff(x) Returns a vector d containing the differences
between adjacent elements in the vector x.
[df_dx,df_dy] = gradient(f,dx,dy) Computes the gradient of the function f (x, y),
where df_dx and df_dy represent and , and
dx and dy are the spacing in the x and y values
associated with the numerical values of f.
d = polyder(p) Returns a vector d containing the
coef cients of the derivative of the
polynomial represented by the vector p.
d = polyder(p1,p2) Returns a vector d containing the coef cients of
the polynomial that is the derivative of the
product of the polynomials represented by p1
and p2.
[num, den] = polyder(p2,p1) Returns the vectors num and den
containing the coef cients of the
numerator and denominator polynomials
of the derivative of the quotient p2/p1,
where p1 and p2 are polynomials.
[t, y] = ode45(@ydot, tspan, y0, Solves the vector differential equation speci ed
options) by the function le whose handle is @ydot and
whose inputs must be t and y, and whose output
must be a column vector representing dy"dt; that
is, f(t, y). The number of rows in this column
vector must equal the order of the equation. The
vector tspan contains the starting and ending
values of the independent variable t, and
optionally any intermediate values of t where the
solution is desired. The vector y0 contains the
initial values. The function le must have two input
arguments, t and y, even for equations where f
(t, y) is not a function of t. The options
argument is created with the odeset function.
The syntax is
identical for the solver ode15s.
== Equal to.
~= Not equal to.
~ NOT ~A returns an array of the same dimension as A;
the new array has 1s where A is 0 and 0s where
A is nonzero.
& AND A & B returns an array of the same dimension
as A and B; the new array has 1s
where both A and B have nonzero elements
and 0s where either A or B is 0.
| OR A | B returns an array of the same dimension
as A and B; the new array has 1s
where at least one element in A or B is nonzero
and 0s where A and B are both 0.
&& Short-Circuit AND Operator for scalar logical expressions. A && B
returns true if both A and B
evaluate to true, and false if they do not.
|| Short-Circuit OR Operator for scalar logical expressions. A || B
returns true if either A or B or
both evaluate to true, and false if they do not.
break Terminates the execution of a for or a while
loop.
case Used with switch to direct program execution.
continue Passes control to the next iteration of a for or
while loop
double Converts a logical array to class double.
else Delineates an alternate block of statements.
elseif Conditionally executes statements
end Terminates for, while, and if statements.
for Repeats statements a speci c number of times.
if Executes statements conditionally.
input(‘s1’, ‘s’) Display the prompt string s1 and stores user
input as a string.
logical Converts numeric values to logical values.
nargin Determines the number of input arguments of a
function.
nargout Determines the number of output arguments of a
function.
switch Directs program execution by comparing the
input expression with the associated case
expressions.
while Repeats statements an inde nite number of
times.
xor Exclusive OR function.