bugGNU Octave - Bugs: bug #53548, area : Octave giving error while...

 
 

bug #53548: area : Octave giving error while MATLAB giving warning in complex input.

Submitted by:  Dildar Sk <hodor123456>
Submitted on:  Mon 02 Apr 2018 05:49:48 PM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Wont Fix Assigned to:  None
Originator Name:  Dildar Sk Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 16 Apr 2018 09:04:19 PM UTC, comment #2:

I believe it is better to leave this as an error. Octave, in general, tries to validate its inputs more carefully than Matlab.

In this case, it's not clear what an area plot of a sequence of complex numbers would look like. It doesn't make much sense, and it probably means the programmer has made an error and it should be reported that way. If the programmer really wants to see an area plot of just the real part of the data then they can easily do so by adding a call to real() inside the call to area like so

This is better than Matlab's default assumption that the real data is more valuable than the complex data and should be the part that is plotted. For example, another perfectly good choice would have been to plot the magnitude of the complex number, rather than just the real part.

Rik <rik5>
Project Administrator
Tue 10 Apr 2018 07:24:13 PM UTC, comment #1:

Dear,

I think that this can be solved modifying the input validation. I attach a file which should work.
Moreover, if in Matlab the scalar argument is given complex, it uses the real part without giving any warning (try area (1:5, 1i) ). In the modification I did a warning is given.

(file #43873)

Michele Ginesi <m_ginesi>
Mon 02 Apr 2018 05:49:48 PM UTC, original submission:

In MATLAB,

In Octave,

Dildar Sk <hodor123456>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #43873:  area.diff added by m_ginesi (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by m_ginesi (Updated the item)
  • -email is unavailable- added by hodor123456 (Submitted the item)
  • -email is unavailable- added by hodor123456
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-16 rik5 StatusNone => Wont Fix
        Open/ClosedOpen => Closed
    2018-04-10 m_ginesi Attached File- => Added area.diff, #43873
    2018-04-02 hodor123456 Carbon-Copy- => Added -email is unavailable-

    Back to the top


    Powered by Savane 3.3