[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #42528] textscan: complex numbers are incorrec
From: |
Philip Nienhuis |
Subject: |
[Octave-bug-tracker] [bug #42528] textscan: complex numbers are incorrectly processed when format is empty |
Date: |
Wed, 11 Jun 2014 21:04:26 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26 |
Follow-up Comment #3, bug #42528 (project octave):
I had a brief look:
The culprit is a matrix transpose operator that also invokes the complex
transpose (as per the definition of the transpose operator BTW, see the
docs).
Quick & dirty fix: replace L. 332:
C(1) = reshape (C{1}, ncols, numel (C{1}) / ncols)';
by
C(1) = conj (reshape (C{1}, ncols, numel (C{1}) / ncols))';
textscan passes all tests then, but I'm not sure yet whether this is a
reliable fix. More investigation is needed for other data types - but I have
not time for that now.
Note that Matlab doesn't accept "textscan ('1i')" (it complains about a
missing format string).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?42528>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/