Integral2 and array valued functions
Ältere Kommentare anzeigen
I want to calculate the following:
Og = [4 3;3 4];
Oginv = inv(Og);
syms s1 s2
z = [s1 s2]*Oginv*[s1;s2];
fun = matlabFunction(z*exp(-z/2));
cdf = integral2(fun,-inf,3,-inf,3, 'AbsTol', 1.e-6)
fun2 = matlabFunction(z^2*exp(-z/2));
cdf2 = integral2(fun2,-inf,3,-inf,3, 'AbsTol', 1.e-6)
So, in this case I want to evaluate two integrals. For sure I can express it as one integral with (z+z^2)*exp(-z/2), however, my problem is more complicated than this one, so if I do in this way it takes to long to evaluate the integral. I know that I can evaluate integrals for array valued functions with a function integral. Can I do the same with integral2 and apply it to this problem?
I would be very grateful for any help.
Kind regards, Kolibris
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Numerical Integration and Differentiation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!