# HG changeset patch # User Rik # Date 1401831720 25200 # Node ID 96f22d6674c4c88f95e5933370ee538cfed025cd # Parent 322eb69e30ad76e913d5d3b8bac2cb4312456757 Fix incorrect sparse matrix example code in oct-file chapter (bug #41799). * external.txi: Use 1-based indexing in sparse matrix creation example to match SparseMatrix constructor. diff -r 322eb69e30ad -r 96f22d6674c4 doc/interpreter/external.txi --- a/doc/interpreter/external.txi Mon Jun 02 08:59:26 2014 -0700 +++ b/doc/interpreter/external.txi Tue Jun 03 14:42:00 2014 -0700 @@ -682,10 +682,10 @@ ColumnVector cidx (nz); ColumnVector data (nz); -ridx(0) = 0; cidx(0) = 0; data(0) = 1; -ridx(1) = 0; cidx(1) = 1; data(1) = 2; -ridx(2) = 1; cidx(2) = 3; data(2) = 3; -ridx(3) = 2; cidx(3) = 3; data(3) = 4; +ridx(0) = 1; cidx(0) = 1; data(0) = 1; +ridx(1) = 2; cidx(1) = 2; data(1) = 2; +ridx(2) = 2; cidx(2) = 4; data(2) = 3; +ridx(3) = 3; cidx(3) = 4; data(3) = 4; SparseMatrix sm (data, ridx, cidx, nr, nc); @end group @end example