Mercurial > hg > octave-lyh
changeset 6524:03c89ade4070
[project @ 2007-04-13 12:19:30 by jwe]
author | jwe |
---|---|
date | Fri, 13 Apr 2007 12:22:12 +0000 |
parents | 589c8dbba916 |
children | 25f3fb4a6f1b |
files | scripts/ChangeLog scripts/sparse/spdiags.m src/ChangeLog src/DLD-FUNCTIONS/find.cc |
diffstat | 4 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2007-04-13 Geordie McBain <geordie.mcbain@aeromech.usyd.edu.au> + + * spdiags.m: Fixed the four-argument case to work for columns of + length one. + 2007-04-12 John W. Eaton <jwe@octave.org> * optimization/qp.m: Avoid Octave indexing bug.
--- a/scripts/sparse/spdiags.m +++ b/scripts/sparse/spdiags.m @@ -76,7 +76,7 @@ ## Create new matrix of size mxn using v,c [j, i, v] = find (v); offset = max (min (c(:), n-m), 0); - j += offset(i); + j = j(:) + offset(i); i = j-c(:)(i); idx = i > 0 & i <= m & j > 0 & j <= n; A = sparse (i(idx), j(idx), v(idx), m, n);
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-04-13 Geordie McBain <geordie.mcbain@aeromech.usyd.edu.au> + + * DLD-FUNCTIONS/find.cc (Ffind): Doc fix. + 2007-04-11 John W. Eaton <jwe@octave.org> * Makefile.in (DOCSTRINGS): Don't echo commands.
--- a/src/DLD-FUNCTIONS/find.cc +++ b/src/DLD-FUNCTIONS/find.cc @@ -183,10 +183,10 @@ @deftypefn {Loadable Function} {} find (@var{x})\n\ @deftypefnx {Loadable Function} {} find (@var{x}, @var{n})\n\ @deftypefnx {Loadable Function} {} find (@var{x}, @var{n}, @var{direction})\n\ -Return a vector of indices of nonzero elements of a matrix. To obtain a\n\ -single index for each matrix element, Octave pretends that the columns\n\ -of a matrix form one long vector (like Fortran arrays are stored). For\n\ -example,\n\ +Return a vector of indices of nonzero elements of a matrix, as a row if\n\ +@var{x} is a row or as a column otherwise. To obtain a single index for\n\ +each matrix element, Octave pretends that the columns of a matrix form one\n\ +long vector (like Fortran arrays are stored). For example,\n\ \n\ @example\n\ @group\n\