Matlab function credits
One-dimensional function (important) points:
The quad function, quadl function, and INT function are used to calculate the integral points of a mona1 function:
Quad and quadl:
Quad and quadl use different algorithms. Generally, quadl is more accurate.
Example: points obtained:
f=inline('sqrt(4*cos(2*t).^2+sin(t).^2+1)');disp(quad(f, 0, 3*pi));
Or:
F = @ (t) (SQRT (4 * Cos (2 * t ). ^ 2 + sin (t ). ^ 2 + 1); disp (QUAD (F, 0, 3 * PI); % displays the credit value
In Quad (F, lower, upper), F is the handle of the product function, lower is the lower threshold of points, upper is the upper limit of points, and quad returns the integral value. The usage of the quadl function is similar.
INT:
The Int function can also be used to evaluate the unary function. The difference between the int function and the quad function (or quadl function) is that the int function can solve indefinite points, while the quad function (or quadl function) can only solve the definite points. In addition, the int function uses the Newton-levenitz method. Therefore, the int function cannot be used to find complicated product functions. The quad function uses the area method under the curve, so it is suitable for most of the product functions.
Example: points obtained:
Syms X; F = (log (X)/(1 + x) ^ 2; disp (INT (f, x, 0, 1); % displays the credit value
Note: When Using int to solve points, you must first define a symbol variable!
F In int (f, x, lower, upper) is a function containing symbol variables, X is a symbol variable, and lower and upper are the lower limit of points respectively.
Binary Function (dual) points:
You can use the dblquad function to calculate binary function credits:
Example: points obtained:
f=@(x, y)(y.*sin(x)+x.*cos(y));xmin=pi;xmax=2*pi;ymin=0;ymax=pi;disp(dblquad(f, xmin, xmax, ymin, ymax));
In dblquad (F, xmin, xmax, ymin, Ymax), F is the handle of the product function,XminIs the minimum internal credit limit,XmaxYesInmostCredit Limit,YminIs the lower limit of external credits, ymAxIs the external credit limit, DBLQuad returns the point value. You can use the triplequad function for triple points. The usage is similar.