bugGNU Octave - Bugs: bug #35150, spdiags() 4-argument...

 
 

bug #35150: spdiags() 4-argument incompatibility

Submitted by:  None
Submitted on:  Wed 21 Dec 2011 11:16:19 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: David Bateman <dbateman>
Originator Name: J.J. GreenOriginator Email: -unavailable-
Open/Closed: ClosedRelease: dev
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 21 May 2012 10:56:31 AM UTC, comment #4:

Cicking on the link with the "Date, comment #N" title brough up an "unflag as spam" button.

John W. Eaton <jwe>
Project Administrator
Mon 21 May 2012 12:23:39 AM UTC, comment #3:

Sorry I accidently flagged an entry in this bug report as spam, and I can't seem to remove the flag !! In any case the error here is a combination of the addition of broadcast operators and the bug fix in the changeset

http://hg.savannah.gnu.org/hgweb/octave/rev/1f0243949b77

which combined means that spdiags treated row vectors of values badly. I believe a more generic fix is

I'll push this fix and so am closing this bug

D.

David Bateman <dbateman>
Project MemberIn charge of this item.
Wed 11 Jan 2012 04:29:36 PM UTC, comment #2:

[resent with corrected formatting]

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

Anonymous
Wed 11 Jan 2012 04:25:24 PM UTC, comment #1:

The following micropatch seems to fix this problem. The effect just to trim the non-relevant parts of the input.
+verbose+
--- 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);
-verbose-

Anonymous
Wed 21 Dec 2011 11:16:19 PM UTC, original submission:

For some small (seemingly silly) cases, Octave's spdiags() fails
while Matlab's suceeds
In fact these cases are not as silly as they first appear, they are used as the starting point for adaptive refinement schemes.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by dbateman (Updated the item)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 21 May 2012 12:29:39 AM UTCdbatemanOpen/ClosedOpen=>Closed
      Discussion LockLocked=>Unlocked
    Mon 21 May 2012 12:23:39 AM UTCdbatemanStatusNone=>Fixed
      Assigned toNone=>dbateman
    Mon 21 May 2012 12:15:57 AM UTCdbatemanSummary[SPAM] spdiags() 4-argument incompatibility=>spdiags() 4-argument incompatibility

    Back to the top


    Powered by Savane 3.1-cleanup1