Hi - yes this should do what you want.


On 9 Feb 2012, at 22:13, Rao, Anil W wrote:

Hi all.

I am trying to generate 2 sets of 50 images, where each set is taken from a multivariate normal distribution with identity covariance matrix of size pxp, where p is the number of voxels in one of the images.

Is this possible using randn? I tried doing this by creating 100 all zero images, merging them with -t option into a 4D image 'mzeros' and then did

fslmaths mzeros -randn mrand
fslsplit mrand rand


I then take images rand00...rand49 images to be one set, and images rand50..rand99 the other, which *appears* reasonable, but will this give me precisely a sample of the correct distribution for each set? I am unsure how the randn function works...


Cheers
Anil


---------------------------------------------------------------------------
Stephen M. Smith, Professor of Biomedical Engineering
Associate Director,  Oxford University FMRIB Centre

FMRIB, JR Hospital, Headington, Oxford  OX3 9DU, UK
+44 (0) 1865 222726  (fax 222717)
[log in to unmask]    http://www.fmrib.ox.ac.uk/~steve
---------------------------------------------------------------------------