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.

Evaluation of numerical integral in matlab

Status
Not open for further replies.

hsev

Newbie level 2
Joined
May 11, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Thailand
Activity points
1,297
Hello everyone who's reading this!

I came up with an integral of the following kind to be evaluated using matlab. I'd be greatful to anyone with any idea regarding this.

Pe=∫(0 to pi/2) [B(Φ)]^N dΦ

where B(Φ) is a function of Φ and involves another integral running from 0 to infinity w.r.t 'x'.
It's like B(Φ) = Ψ(a,b)
where,
Ψ(a,b) = ∫(0 to infinity) exp{ -x + ab/(x+b)} dx

The built in function 'dblquad' in MATLAB directly gives the double integral, but in this case, B(Φ) has to be integrated w.r.t 'x' first and then only be raised to power 'N' and then finally has to be integrated w.r.t to Φ.

Any suggestions will be greatful.
Thanx
 

Re: Evaluation of numerical integral in MATLAB

From MATLAB Help: (help quad)

QUAD Numerically evaluate integral, adaptive Simpson quadrature.
Q = QUAD(FUN,A,B) tries to approximate the integral of scalar-valued
function FUN from A to B to within an error of 1.e-6 using recursive
adaptive Simpson quadrature. FUN is a function handle. The function
Y=FUN(X) should accept a vector argument X and return a vector result
Y, the integrand evaluated at each element of X.
:
:

Added after 10 minutes:

Step1:

You can do the following steps:
E = (@(Φ)exp(-x .+ ab/x+b)
x = 0:100000000 (very large to count for INF)
Ψ = quad(E,x)

I didn't quite understand relation between a,b and Φ

But should be done exactly the same way.

Please let me know if you have any questons

Added after 6 minutes:

Also note that the range on a and b must be defined.

Please note a correction at

a=10 b =10
E = @(x)exp(-x+a*b./x+b)
y = quad(E,1,1000000000000000000000)
 

Re: Evaluation of numerical integral in MATLAB

actually the exact thing is ...
B(phi) = sqrt(8*pi*c)*sin(phi)*exp(2c(sin(phi))^2)*Q(2*sqrt(c)*sin(phi)) where Q(.) is the Q-funtion which i implemented using the erfc relation as an integral

Then this B(phi) needs to be raised to power N before being integrated w.r.t. to phi from 0 to pi/2.

This is the exact thing that I need to evaluate.

Thanks for your response.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top