[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for
From: |
Bill Lash |
Subject: |
[Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs |
Date: |
Mon, 23 Jan 2017 03:52:07 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0 |
Follow-up Comment #4, bug #50124 (project octave):
Thanks, that is more what I expected. It is strange that matlab shows a
slight difference between the before and after for the first set of complex
pairs. Would it be possible to do that again with "format long"?
It seems like it is possible that matlab is forcing the complex pairs to be
conjugates of each other. With my proposed patch, and adding a format long at
the front of the script, I get:
>> format long
>> z = exp (2i*pi*[4; 3; 5; 2; 6; 1; 0]/7);
>> y = [ -1-1i; -1+1i;-3; -2; 1; 2; 3];
>> [z,y]
ans =
-0.900968867902419 - 0.433883739117558i -1.000000000000000 -
1.000000000000000i
-0.900968867902419 + 0.433883739117558i -1.000000000000000 +
1.000000000000000i
-0.222520933956315 - 0.974927912181824i -3.000000000000000 +
0.000000000000000i
-0.222520933956314 + 0.974927912181824i -2.000000000000000 +
0.000000000000000i
0.623489801858733 - 0.781831482468030i 1.000000000000000 +
0.000000000000000i
0.623489801858734 + 0.781831482468030i 2.000000000000000 +
0.000000000000000i
1.000000000000000 + 0.000000000000000i 3.000000000000000 +
0.000000000000000i
>> cplxpair([z,y])
ans =
-0.900968867902419 - 0.433883739117558i -1.000000000000000 -
1.000000000000000i
-0.900968867902419 + 0.433883739117558i -1.000000000000000 +
1.000000000000000i
-0.222520933956315 - 0.974927912181824i -3.000000000000000 +
0.000000000000000i
-0.222520933956314 + 0.974927912181824i -2.000000000000000 +
0.000000000000000i
0.623489801858733 - 0.781831482468030i 1.000000000000000 +
0.000000000000000i
0.623489801858734 + 0.781831482468030i 2.000000000000000 +
0.000000000000000i
1.000000000000000 + 0.000000000000000i 3.000000000000000 +
0.000000000000000i
>> cplxpair([z,y]) - [z,y]
ans =
0 0
0 0
0 0
0 0
0 0
0 0
0 0
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50124>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs, Bill Lash, 2017/01/22
- [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs, Bill Lash, 2017/01/22
- [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs, Bill Lash, 2017/01/22
- [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs, Nicholas Jankowski, 2017/01/22
- [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs,
Bill Lash <=
- [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs, Nicholas Jankowski, 2017/01/22
- [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs, Bill Lash, 2017/01/22
- [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs, Kai Torben Ohlhus, 2017/01/23
- [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs, Rik, 2017/01/26
- [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs, Mike Miller, 2017/01/26
- [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs, Bill Lash, 2017/01/26
- [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs, Rik, 2017/01/26
- [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs, Bill Lash, 2017/01/26
- [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs, Nicholas Jankowski, 2017/01/26
- [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs, Nicholas Jankowski, 2017/01/26