This preview shows page 1. Sign up to view the full content.
Unformatted text preview: % Budiman (2004) % nvar=length(xmean); n if(nargin==4), ntry=1; end; i % induce data with correlation P = chol(corr); P=P'; P xm=zeros(1,nvar); xs=ones(1,nvar); R=latin_hs(xm,xs,nsample,nvar); T = corrcoef(R); Q=chol(T); Q=Q'; S = P * inv(Q); RB= R*S'; R amin=realmax; for il=1:ntry for j=1:nvar % rank RB [r,id]=ranking(RB(:,j)); % sort R [RS,id]=sort(R(:,j)); % permute RS so has the same rank as RB z(:,j) = RS(r).*xsd(j)+xmean(j); end ae=sum(sum(abs(corrcoef(z)-corr))); if(ae<amin), zb=z; amin=ae; end; end e z=zb;...
View Full Document
This note was uploaded on 12/10/2009 for the course ME master taught by Professor Mon during the Spring '09 term at Hanyang University.
- Spring '09