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 FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Other
Status: Wont FixAssigned to: None
Originator Name: Dildar SkOpen/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.


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:


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 Octave,

Dildar Sk <hodor123456>


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

Attach File(s):

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
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by m_ginesi (Updated the item)
  • -unavailable- added by hodor123456 (Submitted the item)
  • -unavailable- added by hodor123456

    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
    Mon 16 Apr 2018 09:04:19 PM UTCrik5StatusNone=>Wont Fix
    Tue 10 Apr 2018 07:24:13 PM UTCm_ginesiAttached File-=>Added area.diff, #43873
    Mon 02 Apr 2018 05:49:48 PM UTChodor123456Carbon-Copy-=>Added -unavailable-

    Back to the top

    Powered by Savane 3.1-cleanup1