Continue to Site

Welcome to EDAboard.com

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.

Definite Integral in Matlab

Status
Not open for further replies.

Sadegh.j

Advanced Member level 3
Advanced Member level 3
Joined
Nov 29, 2006
Messages
749
Helped
48
Reputation
98
Reaction score
15
Trophy points
1,298
Activity points
5,585
matlab integral

Hi

Could some one please tell me how to calculate the definite integral in MATLAB?

Thanks
 

integral matlab

**broken link removed**
 

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]
 

definite integral matlab

Hi

Example : y = exp ( x^2 ) ; interval [10 20]

Answer :

syms x
int ( exp ( x^2 ) , 10 , 20 )

Hope I've helped !!
 
definite integral in matlab

it gives an error that int does not work with class double. how to solve that problem?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top