bugGNU Octave - Bugs: bug #40028, linsolve function is missing

 
 

bug #40028: linsolve function is missing

Submitted by:  Jens Restemeier <jens_restemeier>
Submitted on:  Sat 14 Sep 2013 09:01:39 AM UTC  
 
Category: LibrariesSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Jens RestemeierOpen/Closed: Closed
Release: 3.6.4Operating System: Mac OS

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 26 Sep 2013 04:44:52 PM UTC, comment #5:

Nir, I added your version of linsolve to the development branch of Octave here (http://hg.savannah.gnu.org/hgweb/octave/rev/c3a3532e3d98). I followed it up with another changeset which implemented the coding conventions we like in the core (such as " instead of ' for strings, parentheses around if conditions, etc.) (http://hg.savannah.gnu.org/hgweb/octave/rev/b66f068e4468).

The fix will be available in the next stable release of Octave, or the m-file can be grabbed from the Mercurial repository for backporting to 3.6.4.

Closing report.

Rik <rik5>
Project Administrator
Tue 24 Sep 2013 05:58:53 PM UTC, comment #4:

Here is a basic implementation

(file #29206)

Nir Krakauer <nir_krakauer>
Mon 16 Sep 2013 02:24:02 AM UTC, comment #3:

linsolve is unnecessary, but we would add it for compatibility if anyone works up a changeset.

Rik <rik5>
Project Administrator
Sun 15 Sep 2013 07:33:53 AM UTC, comment #2:

That is a good point, and I was expecting that the actual functionality is present or available as a package. Though if users work with a sizeable third party script then they may not be in a position to rewrite sections or look up equivalent octave functions.
So I can't see why linsolve can't be provided at least as part of a compatibility package, as a wrapper around built-in functions.

Jens Restemeier <jens_restemeier>
Sat 14 Sep 2013 11:26:57 PM UTC, comment #1:

linsolve is generally unnecessary in Octave, you can just use the division operators '/', '\', or their named equivalents mldivide, mrdivide. In fact, you can do this in Matlab as well and then the script would be portable between the two.

Octave automatically detects the type of the matrix on the first attempt to solve a linear equation. You can manually set the matrix type, in the same manner as linsolve, using the matrix_type() function. But why bother? Particularly, because if you get the type wrong the results will be rubbish.

Rik <rik5>
Project Administrator
Sat 14 Sep 2013 09:01:39 AM UTC, original submission:

The script I'm looking at is using the linsolve function, that is not implemented in Octave:
http://www.mathworks.co.uk/help/matlab/ref/linsolve.html

So far this doesn't seem to be implemented in any octave forge package, either.

This implementation that is part of the dynare project solved it for my case:
https://github.com/DynareTeam/dynare/blob/master/mex/sources/linsolve/linsolve.cc

It is GPL3 licensed, so maybe the authors can be convinced to submit it to octave as well.

Jens Restemeier <jens_restemeier>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #29206:  linsolve.m added by nir_krakauer (3KiB - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by nir_krakauer (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jens_restemeier (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 26 Sep 2013 04:44:52 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Tue 24 Sep 2013 05:58:53 PM UTCnir_krakauerAttached File-=>Added linsolve.m, #29206
    Sat 14 Sep 2013 11:26:57 PM UTCrik5Severity3 - Normal=>2 - Minor

    Back to the top


    Powered by Savane 3.1-cleanup1