|
From: | Jeff Fessler |
Subject: | [Octave-bug-tracker] [bug #45682] str2func should accept '@(x) x^2' for matlab compatability |
Date: | Mon, 03 Aug 2015 18:50:39 +0000 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:39.0) Gecko/20100101 Firefox/39.0 |
URL: <http://savannah.gnu.org/bugs/?45682> Summary: str2func should accept '@(x) x^2' for matlab compatability Project: GNU Octave Submitted by: professler Submitted on: Mon 03 Aug 2015 06:50:37 PM GMT Category: Octave Function Severity: 3 - Normal Priority: 5 - Normal Item Group: Matlab Compatibility Status: None Assigned to: None Originator Name: Jeff Fessler Originator Email: Open/Closed: Open Discussion Lock: Any Release: 3.8.2 Operating System: Any _______________________________________________________ Details: Matlab is going to phase out inline in future releases http://www.mathworks.com/help/matlab/ref/inline.html But there are still situations where one must create a function from a string and "strfunc" is the way to do that. In Matlab, the following code bit makes a useful function handle: sqr = str2func('@(x) x^2') whereas octave (3.8.2) returns the following error message: error: @@(x) x^2: no function and no method found For compatibility it would be useful if Octave also supported that usage of str2func(). _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?45682> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |