How can I integrate a function with matrices?
조회 수: 16 (최근 30일)
이전 댓글 표시
I want to integrate the multivariate normal distribution. Here is my function:
mvNV_Blattstrke=@(x) ((1/sqrt(det(Kovarianzmatrix)*(2*pi)^T))*exp(-0.5*(x-mu).^k)*Inverse_Kovarianzmatrix*(x-mu));
Kovarianzmatrix, Inverse_Kovarianzmatrix and mu are 1x3 double matrices. T, k and the integration limits USG_Blattstrke and OSG_Blattstrke are 1x1 double variables. When I try to calculate the integration I get errors:
Integral_Blattstrke=integral(mvNV_Blattstrke,USG_Blattstrke,OSG_Blattstrke);
Matrix dimensions must agree.
Error in @(x)((1/sqrt(det(Kovarianzmatrix)*(2*pi)^3))*exp(-0.5*(x-mu).^k)*Inverse_Kovarianzmatrix*(x-mu))
Error in integralCalc/iterateScalarValued (line 314)
fx = FUN(t);
Error in integralCalc/vadapt (line 132)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
Error in integralCalc (line 75)
[q,errbnd] = vadapt(@AtoBInvTransform,interval);
Error in integral (line 88)
Q = integralCalc(fun,a,b,opstruct);
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!