Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
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]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.