integral en matlab
for example to compute :
int(sin(2*x),0,pi/2) or int(sin(2*x),x,0,pi/2)
will compute sin2x integral on the interval of [0 pi]
or you can have integral of a function e.g:
write an M-file function myfun that computes the integrand:
function y = myfun(x)
y = 1./(x.^3-2*x-5);
Then pass @myfun, a function handle to myfun, to quad, along with the limits of integration, 0 to 2:
Q = quad(@myfun,0,2)
Q =
-0.4605
Alternatively, you can pass the integrand to quad as an anonymous function handle F:
F = @(x)1./(x.^3-2*x-5);
Q = quad(F,0,2);
by the way you can have all these by matlab help.it is so easy just open matlab help and use search tab. [/img]