From: <as...@us...> - 2012-04-30 21:56:03
|
Revision: 10340 http://octave.svn.sourceforge.net/octave/?rev=10340&view=rev Author: asnelt Date: 2012-04-30 21:55:57 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Renamed end to endfor. Modified Paths: -------------- trunk/octave-forge/main/statistics/inst/mnrnd.m Modified: trunk/octave-forge/main/statistics/inst/mnrnd.m =================================================================== --- trunk/octave-forge/main/statistics/inst/mnrnd.m 2012-04-30 21:53:25 UTC (rev 10339) +++ trunk/octave-forge/main/statistics/inst/mnrnd.m 2012-04-30 21:55:57 UTC (rev 10340) @@ -150,7 +150,7 @@ else x(i, :) = NaN; endif - end + endfor endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <as...@us...> - 2012-05-01 16:18:32
|
Revision: 10345 http://octave.svn.sourceforge.net/octave/?rev=10345&view=rev Author: asnelt Date: 2012-05-01 16:18:26 +0000 (Tue, 01 May 2012) Log Message: ----------- Replaced reference to statistics book. Modified Paths: -------------- trunk/octave-forge/main/statistics/inst/mnrnd.m Modified: trunk/octave-forge/main/statistics/inst/mnrnd.m =================================================================== --- trunk/octave-forge/main/statistics/inst/mnrnd.m 2012-05-01 12:41:10 UTC (rev 10344) +++ trunk/octave-forge/main/statistics/inst/mnrnd.m 2012-05-01 16:18:26 UTC (rev 10345) @@ -27,7 +27,7 @@ ## sample. The elements of @var{n} must be non-negative integers. ## ## @item -## @var{n} is the second parameter of the multinomial distribution. @var{p} can +## @var{p} is the second parameter of the multinomial distribution. @var{p} can ## be a vector with the probabilities of the categories or a matrix with each ## row containing the probabilities of a multinomial sample. If @var{p} has ## more than one row and @var{n} is non-scalar, then the number of rows of @@ -37,6 +37,7 @@ ## @var{s} is the number of multinomial samples to be generated. @var{s} must ## be a non-negative integer. If @var{s} is specified, then @var{n} must be ## scalar and @var{p} must be a vector. +## @end itemize ## ## @subheading Return values ## @@ -56,19 +57,19 @@ ## @example ## @group ## n = 10; -## p = [0.2 0.5 0.3]; +## p = [0.2, 0.5, 0.3]; ## x = mnrnd (n, p); ## @end group ## ## @group ## n = 10 * ones (3, 1); -## p = [0.2 0.5 0.3]; +## p = [0.2, 0.5, 0.3]; ## x = mnrnd (n, p); ## @end group ## ## @group ## n = (1:2)'; -## p = [0.2 0.5 0.3; 0.1 0.1 0.8]; +## p = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; ## x = mnrnd (n, p); ## @end group ## @end example @@ -81,8 +82,8 @@ ## Handbook with MATLAB}. Appendix E, pages 547-557, Chapman & Hall/CRC, 2001. ## ## @item -## Athanasios Papoulis. @cite{Probability, Random Variables, and Stochastic -## Processes}. pages 104 and 148, McGraw-Hill, New York, second edition, 1984. +## Merran Evans, Nicholas Hastings and Brian Peacock. @cite{Statistical +## Distributions}. pages 134-136, Wiley, New York, third edition, 2000. ## @end enumerate ## @end deftypefn @@ -156,7 +157,7 @@ %!test %! n = 10; -%! p = [0.2 0.5 0.3]; +%! p = [0.2, 0.5, 0.3]; %! x = mnrnd (n, p); %! assert (size (x), size (p)); %! assert (all (x >= 0)); @@ -165,7 +166,7 @@ %!test %! n = 10 * ones (3, 1); -%! p = [0.2 0.5 0.3]; +%! p = [0.2, 0.5, 0.3]; %! x = mnrnd (n, p); %! assert (size (x), [length(n) length(p)]); %! assert (all (x >= 0)); @@ -174,7 +175,7 @@ %!test %! n = (1:2)'; -%! p = [0.2 0.5 0.3; 0.1 0.1 0.8]; +%! p = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; %! x = mnrnd (n, p); %! assert (size (x), size (p)); %! assert (all (x >= 0)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |