Double Integral Fail Error. Numerical Integration Fails.

Hi All,
I am trying to solve an equation with double integral but it is giving me error as 'The integration was unsuccessful' , Infinite or Not-a-Number value encountered. However, when i use Mathematica for the same equation, it is giving me answer. My question is, isn't Matlab also supposed to give the answer same as Mathematica?
Here is the equation I am trying to solve and the Matlab code. Could you check where i am doing it wrong?
eta = 0.9;
psplit = 0.3;
PsN0dB = 0:5:45;
PsN0 = 10.^(PsN0dB/10);
v1 = 1;
v2 = 0.0625;
v3 = 0.0625;
v4 = 1;
a1 = 0.2;
a2 = 0.8;
for p = 1: length(PsN0)
lim1 = a2 ./ a1;
M_2 = @(m,n)((m .* n) ./ ((1 + n) .* ((1 - psplit) .* PsN0(p) .* (a2 - (n .* a1))).^2)) ...
.* exp(-(v2 - ((v1 .* v3) ./ (v4 .* n))) .* (n ./ ((1 - psplit) .* PsN0(p) .* ...
(a2 - (n .* a1)))) .* ( m - ((v4 .* (1 - psplit) .* PsN0(p) .* ...
(a2 - (n .* a1))) ./ (eta .* psplit .* PsN0(p) .* m)))) .* ...
expint((v1 .* ((n .* v4) + (m .* v3))) ./ (v4 .* (1 - psplit) .* PsN0(p) .* (a2 - (n .* a1))));
G(p)= (1 ./ (2 .* log(2))) .* ((v3 .* v2 .* v1)./ v4) .* integral2(M_2,0,lim1,1,Inf);
end

3 Kommentare

What is the correct value of integral? As it is currently written, it is not a simple 2D integral. The 'm' term outside the inner integral will not be integrated, and the final solution will be a function of 'm', not a constant.
Hi Ameer,
Thank you for your reply. The m term can be inside the inner integral. But still i am not able to get the answer. However, Mathematica is able to give answer for the same equation. Do you know what could be possible wrong here? Could you check?
BR,
Glorit P.
Can you show the solution given by Mathematica?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 4 Jun. 2020

Kommentiert:

am 5 Jun. 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by