bugGNU Octave - Bugs: bug #33849, Incorrect plot result when mixing...

 
 

bug #33849: Incorrect plot result when mixing complex values and real integers

Submitted by:  Steve Duncan <shd01>
Submitted on:  Sun 24 Jul 2011 06:52:48 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Steve DuncanOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Thu 17 Oct 2013 06:30:27 PM UTC, comment #7:

Is there anything to fix here? I just tested

and it is equivalent to 'plot (x,x)' which is what Matlab does. Perhaps we can close this before the 3.8 release.

Rik <rik5>
Project Administrator
Fri 02 Sep 2011 03:08:35 AM UTC, comment #6:

hmm .... my post got cut off :-(

Matlab will treat ...

plot (x + 1i, x +2i)

... the same as ...

plot (x, x)

Perhaps Octave can use format specifications as implicit delimiters for objects. If so, this feature should be well documented to avoid confusion.

Ben Abbott <bpabbott>
Project Member
Fri 02 Sep 2011 02:50:30 AM UTC, comment #5:

I expect some confusion with how the code below should behave.

Ben Abbott <bpabbott>
Project Member
Mon 25 Jul 2011 07:47:05 PM UTC, comment #4:

Yeah, I didn't realise it didn't work on Matlab either. I use it all the time too. Turns out that if you give plot arguments for more than one plot, then you have to specify x-y pairs, can't use implicit x anymore.

At any rate, the question is, do we want to introduce another Matlab incompatibility here, for the case using hold that does work on both and produces the same output on both?

Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Mon 25 Jul 2011 07:14:46 PM UTC, comment #3:

Good lord! I've been using this feature for ages - I had no idea.

It's so useful, it ought to be supported...

Steve Duncan <shd01>
Mon 25 Jul 2011 01:23:31 PM UTC, comment #2:

By the way, calling plot this way seems to work by accident on Octave (plot's docstring doesn't mention this way of calling it) and it fails on Matlab. However, the equivalent calls

do work on Matlab and produce the same results as in Octave. While I agree the results are surprising, perhaps there's a good reason why they are so.

Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Sun 24 Jul 2011 07:01:56 PM UTC, comment #1:

The problem persists in the dev version. This command makes it a bit easier to see:

Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Sun 24 Jul 2011 06:52:48 PM UTC, original submission:

The following code causes the blue star to appear at position (1+j):

plot(exp(j2pi[0:3]/4),'r',1,'b*')

whereas the following is plotted correctly:

plot(exp(j2pi[0:3]/4),'r',j,'b*')

Steve Duncan <shd01>

 

(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 rik5 (Posted a comment)
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by shd01 (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
    Wed 23 Oct 2013 03:38:01 AM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Sun 24 Jul 2011 07:01:56 PM UTCjordighStatusNone=>Confirmed
      Release3.2.4=>dev

    Back to the top


    Powered by Savane 3.1-cleanup1