[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62682] ezplot() gets different results betwee
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #62682] ezplot() gets different results between inline function and anonymous function |
Date: |
Tue, 5 Jul 2022 13:40:00 -0400 (EDT) |
Update of bug #62682 (project octave):
Item Group: Documentation => Unexpected Error or
Warning
Status: None => Fixed
Open/Closed: Open => Closed
Release: 6.4.0 => dev
_______________________________________________________
Follow-up Comment #14:
The warning about inline functions is intended for programmers so they
understand that they should update their m-files to use anonymous functions.
In this case, ezplot.m is a core Octave function and it is knowingly using
inline() to accomplish a specific task. I don't think it needs to warn about
it. For reference, the symvars.m function specifically turns off the warning
before using inline in a known way to accomplish a known goal.
function vars = symvar (str)
warning ("off", "Octave:legacy-function", "local"); # using inline below.
vars = argnames (inline (str));
## Correct for auto-generated 'x' variable when no symvar was found.
if (numel (vars) == 1 && strcmp (vars{1}, "x") && ! any (str == "x"))
vars = {};
endif
endfunction
Using grep, there are two functions---__ezplot__.m and fplot.m---which make
use of inline(). I temporarily disabled the warnings in this changeset:
http://hg.savannah.gnu.org/hgweb/octave/rev/18b8f73595e0.
For fplot, Matlab issues a warning when a string is used as input which notes
that this syntax will be removed in a future release and then recommends using
anonymous functions. Octave could do the same thing as well.
Marking bug as Fixed and closing report.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62682>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #62682] ezplot() gets different results between inline function and anonymous function,
Rik <=