Create a function from user input string
Show older comments
I am trying to develop a GUI which will allow the user to type a function into a text box and then perform operations to that function. For example suppose the user inputs 'x^2+2x+3' into a text box.
How can I convert the string into a function so I can perform iterative operations on?
such as:
function [y] = f(x)
y=x^2+2x+3;
end
I am fairly new at matlab so any help would be appreciated.
Accepted Answer
More Answers (1)
Categories
Find more on Characters and Strings in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!