From help-octave-request at bevo dot che dot wisc dot edu Thu Jan 24 12:20:56 2002 Subject: Re: Correlating samples generated by randn From: Dirk Eddelbuettel To: Pascual Mu?oz Mu?oz Cc: help-octave at bevo dot che dot wisc dot edu Date: Thu, 24 Jan 2002 12:20:46 -0600 On Thu, Jan 24, 2002 at 07:11:42PM +0100, Pascual Mu?oz Mu?oz wrote: > I want to use randn to generate a random process realization where each > sample in the realization is correlated with some of its neighboor > samples. Is this possible in Octave? How? If C is the covariance matrix you want to use, then n = rows(C); Q = chol(C); # so that Q'*Q equals C X = Q'*randn(n,1); # multivariate Normal(Zero, C) Dirk -- Good judgment comes from experience; experience comes from bad judgment. -- F. Brooks ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------