octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #52673] fplot gives error for fplot(@(x) 0, [-


From: Kai Torben Ohlhus
Subject: [Octave-bug-tracker] [bug #52673] fplot gives error for fplot(@(x) 0, [-2, 2])
Date: Fri, 15 Dec 2017 07:46:57 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36

Update of bug #52673 (project octave):

              Item Group:        Unexpected Error => Matlab Compatibility   
                  Status:                    None => Confirmed              
        Operating System:       Microsoft Windows => Any                    

    _______________________________________________________

Follow-up Comment #1:

Thank you for your report.  Please consider the programming notes of fplot:


fplot requires that the function accept and return a vector argument. Consider
this when writing user-defined functions and use .*, ./, etc. See the function
vectorize for potentially converting inline or anonymous functions to
vectorized versions.


https://www.gnu.org/software/octave/doc/interpreter/XREFfplot

So in general the function fplot was called with an improper function.

Matlab R2017b also throws a bunch of warnings before finally generating the
desired plot.


Warning: Function behaves unexpectedly on array inputs. To improve
performance, properly vectorize your function to return an output with the
same size and shape as the input arguments. 
> In matlab.graphics.function.FunctionLine>getFunction
  In matlab.graphics.function.FunctionLine/updateFunction
  In matlab.graphics.function.FunctionLine/set.Function_I
  In matlab.graphics.function.FunctionLine/set.Function
  In matlab.graphics.function.FunctionLine
  In fplot>singleFplot (line 232)
  In fplot>@(f)singleFplot(cax,{f},limits,extraOpts,args) (line 191)
  In fplot>vectorizeFplot (line 191)
  In fplot (line 161)


Thus I declare this item as Matlab compatibility problem.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52673>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]