lhs_empirco - corr=corrcoef(data);...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function s=lhs_empirco(data,nsample) % s=lhs_empirco(data,nsample) % perform lhs on multivariate empirical distribution % with correlation % Input: % data : data matrix (ndata,nvar) % nsample : no. of samples % Output: % s : random sample (nsample,nvar) % Budiman (2003) % [m,nvar]=size(data);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: corr=corrcoef(data); rc=rank_corr(corr,nsample); % induce correlation for j=1:nvar r=rc(:,j); % draw random no. u=rand(nsample,1); % calc. percentile p=((r-u)./nsample).*100; % inverse from empirical distribution s(:,j)=prctile(data(:,j),p); end...
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.

Ask a homework question - tutors are online