Integral2 and array valued functions
이전 댓글 표시
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
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!