octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #35150] spdiags() 4-argument incompatibility


From: anonymous
Subject: [Octave-bug-tracker] [bug #35150] spdiags() 4-argument incompatibility
Date: Wed, 11 Jan 2012 16:29:36 +0000
User-agent: Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1

Follow-up Comment #2, bug #35150 (project octave):

[resent with corrected formatting]

The following micropatch seems to fix this problem. The effect just to trim
the non-relevant parts of the input. 

--- scripts/sparse/spdiags.m 2012-01-11 17:02:52.000000000 +0100
+++ spdiags.m 2012-01-11 16:56:26.000000000 +0100
@@ -78,6 +78,10 @@
else
## Create new matrix of size mxn using v,c
[j, i, v] = find (v);
+ idx = (i <= m) & (j <= n);
+ i = i(idx);
+ j = j(idx);
+ v = v(idx);
offset = max (min (c(:), n-m), 0);
j = j + offset(i);
i = j-c(:)(i); 


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?35150>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]