matlab integration
fun = @(x) exp(-x.^2).*log(x).^2;
q = integral(fun,xmin,xmax)
4.22
9
int(f)
Thank you!
9
0
0
0
q = integral(fun,xmin,xmax)
q = integral(fun,xmin,xmax,Name,Value)
Description
q = integral(fun,xmin,xmax) numerically integrates function fun
from xmin to xmax using global adaptive quadrature and default error tolerances.
q = integral(fun,xmin,xmax,Name,Value) specifies additional options
with one or more Name,Value pair arguments.
For example, specify 'WayPoints' followed by a vector of real or complex
numbers to indicate specific points for the integrator to use.
Example1:
fun = @(x) exp(-x.^2).*log(x).^2;
q = integral(fun,0,Inf) % Evaluate integral from 0 to infinity
Example2:
TOL = eps;
fun = @(x) exp(-x.^2).*log(x).^2;
q = integral(fun,0,Inf, 'AbsTol', TOL) % Evaluate integral from 0 to infinity with tolerance TOL
Thank you!
0
0
Are there any code examples left?
New code examples in category Matlab
-
Matlab 2022-03-12 20:25:01 switch matlab
-
Matlab 2022-02-28 23:10:26 scilab trace function
-
Matlab 2022-02-22 08:40:07 matlab tilde
-
Matlab 2022-02-09 18:00:07 matlab preallocate array size
-
Matlab 2022-02-09 17:50:01 plot in log scale matlab
-
Matlab 2022-02-03 10:21:25 zsh corrupt history file
-
Matlab 2022-02-02 23:16:39 octave wait
-
Matlab 2022-02-02 19:17:12 matlab app designer numeric edit field properties
-
Matlab 2022-02-02 17:36:14 matlab zero vector
-
Matlab 2022-02-02 15:45:30 diff(x) matrix matlab