double integral implementation in matlab
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
mathguy
am 17 Dez. 2015
Beantwortet: khadija sofi
am 26 Feb. 2018
I am in trouble to implement the following double integral. there is a summation inside the integral which make things a bit complicated. The matlab code I did is as follows and always has error like "Matrix dimensions must agree." , any hint to implement it? thanks
n=3;
nn=1:n;
aa=gamma([1:n])
thre=3;
lapha=4;
r=3;
fun1= @(theta, x) (1-sum( lambda *pi *( (x-r).^2+r^2-(x-r).*r.*cos(theta)).^(nn-1)./aa).*exp(-1*lambda *pi*((x-r).^2+r^2-(x-r).*r.*cos(theta)))).*lambda/n*(1-1/2^n).*thre.*r.^alpha.*(x-r).^(1-alpha) ;
answer=integral2( fun1, 0, 2*pi, 0, inf )

0 Kommentare
Akzeptierte Antwort
Torsten
am 17 Dez. 2015
Note that x and theta are arrays, not scalars. This is in conflict with your summation.
Supply the function to be integrated in a separate .m-file where you perform the summation in a while-loop.
Best wishes
Torsten.
0 Kommentare
Weitere Antworten (1)
khadija sofi
am 26 Feb. 2018
Hello,
I have the same shape of integral, and i still have some problems, did you manage to calculate the integral above ? could you please tell me more of how to do it ?
Thank you in advance
0 Kommentare
Siehe auch
Kategorien
Mehr zu Numerical Integration and Differentiation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!