Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Computing many probabilities without a for loop

1 vue (au cours des 30 derniers jours)
Jeong Ho
Jeong Ho le 9 Mar 2015
Clôturé : MATLAB Answer Bot le 20 Août 2021
Hi, I have N X 2 matrix, mu, and N X 3 matrix, SIGMA, where mu(i,:) is a row vector of expectations for i-th bivariate normal distribution and SIGMA(i,:) is a row vector of elements of the covariance matrix for i-th bivariate normal distribution, i.e.,
[SIGMA(i,1) SIGMA(i,2); SIGMA(i,2) SIGMA(i,3)] is the covariance matrix of for i-th bivariate normal distribution,
and there are N bivariate normal distribution. For each i, I want to compute the probability of each bivariate normal random variable being positive, i.e.,
for i=1:N Y(i) = mvncdf([0 0],[Inf Inf],mu(i,2:3),[SIGMA(i,1) SIGMA(i,2); SIGMA(i,2) SIGMA(i,3)]); end
Is there any way to do this without the for loop? I have a large N and I want to circumvent using the for loop. I'd really appreciate your guidance. Thank you very much in advance!
Best, John

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by