For Programmers: Free Programming Magazines  


Home > Archive > Matlab > April 2005 > Cholesky









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Cholesky
marco_bandit

2005-04-22, 4:04 pm

Hi,
I have two normal distributions with paramiters (m1, s1) e (m2 s2). I
want that this two distributions have a correlation coefficent egual
corrx. I use to do this the Cholesky factorization. Well I obtain two
distribution with correlation coefficent corrx, one distribution with
parameters (m1 s1) but the other distribution has s2 standard
deviation like I want but different mean. I wrote :

n1 = normrnd(D_media_nor,D_sdev_nor,[GENE 1]);
n2 = normrnd(F_media_nor,F_sdev_nor,[GENE 1]);
n= [n1 n2];

A1=chol(CORRE_MATR);
C=(A1'*n')';

Thanks
Marco
Peter Perkins

2005-04-22, 9:00 pm

Marco, have you looked at MVNRND?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com