[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #41346] spconvert() with complex matrices
From: |
INVALID.NOREPLY |
Subject: |
[Octave-bug-tracker] [bug #41346] spconvert() with complex matrices |
Date: |
Sat, 25 Jan 2014 10:41:51 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20131215 Firefox/24.0 Iceweasel/24.2.0 |
URL:
<http://savannah.gnu.org/bugs/?41346>
Summary: spconvert() with complex matrices
Project: GNU Octave
Submitted by: tmac
Submitted on: Sat 25 Jan 2014 10:41:50 AM GMT
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.8.0
Operating System: GNU/Linux
_______________________________________________________
Details:
Hi!
The Matlab 2013a spconvert() works for three-column complex matrices, but the
Octave 3.8.0 spconvert() does not. This prevents me from loading m-files
generated by Petsc 3.4.3, i.e. to transfer matrices from Petsc to Octave.
For example, consider the following command:
> spconvert ([8 8 2.3958333333333320e-01+4.7916666666666643e+00i])
In Matlab 2013a, the result is:
(8,8) 0.2396 + 4.7917i
In Octave 3.8.0, the result is:
error: spconvert: argument must be sparse or real matrix with 3 or 4 columns
error: called from:
error: /opt/local/share/octave/3.8.0/m/sparse/spconvert.m at line 37,
column 7
I posted this to the Octave help mailing list, and one of the resposes
included a suggestion for a fix for spconvert. The thread is archived here:
http://octave.1599824.n4.nabble.com/Running-m-files-generated-by-Petsc-3-4-3-td4661348.html
I will quote the fix suggestion of Carlo Defalco:
"If we want to, the ix is trivial, simply change line 35 of "spconvert.m"
from
if (nargin != 1 || ! ismatrix (m) || ! isreal (m)
to
if (nargin != 1 || ! ismatrix (m) "
Best regards
Torquil Sørensen
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?41346>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #41346] spconvert() with complex matrices,
INVALID.NOREPLY <=