[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
parcellfun and rand
From: |
Muhali |
Subject: |
parcellfun and rand |
Date: |
Fri, 3 Sep 2010 21:55:11 -0700 (PDT) |
Unlike cellfun, parcellfun appears to re-initialize the rand function in each
call. This is counter-intuitive.
octave:1> disp(parcellfun(1, @(x) rand, cell(1,1), "UniformOutput", false,
"verboselevel", 0))
{
[1,1] = 0.32068
}
octave:2> disp(parcellfun(1, @(x) rand, cell(1,1), "UniformOutput", false,
"verboselevel", 0))
{
[1,1] = 0.32068
}
octave:3> disp(cellfun(@(x) rand, cell(1,1), "UniformOutput", false))
{
[1,1] = 0.32068
}
octave:4> disp(cellfun(@(x) rand, cell(1,1), "UniformOutput", false))
{
[1,1] = 0.26259
}
--
View this message in context:
http://octave.1599824.n4.nabble.com/parcellfun-and-rand-tp2526487p2526487.html
Sent from the Octave - General mailing list archive at Nabble.com.
- parcellfun and rand,
Muhali <=
- Re: parcellfun and rand, Jaroslav Hajek, 2010/09/04
- Re: parcellfun and rand, Francesco Potortì, 2010/09/04
- Re: parcellfun and rand, Francesco Potortì, 2010/09/04
- Re: parcellfun and rand, Muhali, 2010/09/05
- Re: parcellfun and rand, Muhali, 2010/09/07
- Re: parcellfun and rand, Francesco Potortì, 2010/09/07
- Re: parcellfun and rand, Muhali, 2010/09/07
- Re: parcellfun and rand, Francesco Potortì, 2010/09/07
- Re: parcellfun and rand, Jaroslav Hajek, 2010/09/08
- Re: parcellfun and rand, Jaroslav Hajek, 2010/09/08