bugGNU Octave - Bugs: bug #39287, fplot(@(x) 1, [0 1])

 
 

bug #39287: fplot(@(x) 1, [0 1])

Submitted by:  Muhali <muhali>
Submitted on:  Wed 19 Jun 2013 01:23:41 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: None
Originator Name: Open/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.

 

Wed 19 Jun 2013 06:57:31 PM UTC, comment #3:

I checked in a changeset that specifically deals with constant value functions as inputs to fplot (http://hg.savannah.gnu.org/hgweb/octave/rev/5ec3f4aea91c). Closing report.

Rik <rik5>
Project Administrator
Wed 19 Jun 2013 06:44:57 PM UTC, comment #2:

Matlab r2013b prerelease returns:

ans =

1

>>

Philip Nienhuis <philipnienhuis>
Project Member
Wed 19 Jun 2013 05:35:26 PM UTC, comment #1:

Could you test what Matlab returns for

It sounds like it will just return a single 1 which is the root of the problem. I can patch fplot to test for the case of a constant function if this is indeed the "correct" behavior for feval.

Rik <rik5>
Project Administrator
Wed 19 Jun 2013 01:23:41 PM UTC, original submission:

should plot a straight line. But octave produces

error: interp1: table too short

This is perhaps related to

giving just 1, not [1 1], which I would expect and which is correctly produced when using '1+0*x' instead.

The feval behavior is identical to ML though.

Muhali <muhali>

 

(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 muhali (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 19 Jun 2013 06:57:31 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1