# HG changeset patch # User jwe # Date 1199472160 0 # Node ID 74075b3b54c1ac7c2d79ee70a8bf8b07195bb069 # Parent 4571f691b0cee61f1e4d2f2a2fc7dea59dae8d99 [project @ 2008-01-04 18:42:40 by jwe] diff --git a/doc/interpreter/tips.txi b/doc/interpreter/tips.txi --- a/doc/interpreter/tips.txi +++ b/doc/interpreter/tips.txi @@ -150,7 +150,7 @@ aligns such a comment if it is already present. @item ## -Comments that start with two semicolons, @samp{##}, should be aligned to +Comments that start with a double sharp-sign, @samp{##}, should be aligned to the same level of indentation as the code. Such comments usually describe the purpose of the following lines or the state of the program at that point. diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2008-01-04 Muthiah Annamalai + + * general/sub2ind.m, general/ind2sub.m: Doc fix. + 2008-01-04 Soren Hauberg * set/create_set.m, set/union.m: Accept "rows" argument. diff --git a/scripts/general/ind2sub.m b/scripts/general/ind2sub.m --- a/scripts/general/ind2sub.m +++ b/scripts/general/ind2sub.m @@ -1,4 +1,4 @@ -## Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007 Paul Kienzle +## Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007, 2008 Paul Kienzle ## ## This file is part of Octave. ## @@ -21,8 +21,8 @@ ## Convert a linear index into subscripts. ## ## The following example shows how to convert the linear index @code{8} -## in a 3-by-3 matrix into a subscript. -## +## in a 3-by-3 matrix into a subscript. The matrix is linearly indexed +## moving from one column to next, filling up all rows in each column. ## @example ## [r, c] = ind2sub ([3, 3], 8) ## @result{} r = 2 diff --git a/scripts/general/sub2ind.m b/scripts/general/sub2ind.m --- a/scripts/general/sub2ind.m +++ b/scripts/general/sub2ind.m @@ -1,4 +1,4 @@ -## Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007 Paul Kienzle +## Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007, 2008 Paul Kienzle ## ## This file is part of Octave. ## @@ -22,7 +22,9 @@ ## Convert subscripts into a linear index. ## ## The following example shows how to convert the two-dimensional -## index @code{(2,3)} of a 3-by-3 matrix to a linear index. +## index @code{(2,3)} of a 3-by-3 matrix to a linear index. The matrix +## is linearly indexed moving from one column to next, filling up +## all rows in each column. ## ## @example ## linear_index = sub2ind ([3, 3], 2, 3)