From bug-request at octave dot org Fri Dec 9 07:05:44 2005 Subject: Re: Input arguments for some base statistics functions From: Paul Kienzle To: William Poetra Yoga Hadisoeseno Cc: bug at octave dot org Date: Fri, 9 Dec 2005 08:04:26 -0500 On Dec 8, 2005, at 12:52 PM, William Poetra Yoga Hadisoeseno wrote: > Some functions take different input arguments as their Matlab > counterparts. For example, in Matlab, normrnd takes the mean (mu) and > standard deviation (sigma), according to the docs (I believe the docs > this time, since my teacher says so and everyone in class uses it, but > I'll check it on my teacher's laptop tomorrow). But in Octave, normrnd > takes the mean (mu) and variance (sigma squared). It's not only > normrnd, but also all the other functions AFAIK. > > Should we fix this? The main problem is that existing scripts will > break... I myself have this check at the start of my scripts: > > if (abs(var(normrnd(0,10,100000,1))-10) < 1.5) > z=25; > else > z=5; > end > > where the desired standard deviation is 5. This was discussed on the list. When renaming functions from the original octave names (normal_rnd in this case) we should have made sure that the parameters corresponded to the matlab equivalent. http://www.octave.org/octave-lists/archive/bug-octave.2005/msg00841.html - Paul ------------------------------------------------------------- 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 -------------------------------------------------------------