MATLAB: Haw i can ask a user to input a mathematical function


hello i went to ceat a small programme in matlab 2009a and i have a problem, i went to ask the yser to input a mathematical function and my programme know that is maths function beacause the user can input any thin and my quations is haw i can distinct that is mathematical formula thank you

Best Answer

Use input() with the 's' option.
It is not possible to tell mathematical formulae apart from random characters. There is no standard for mathematical formulae. What looks like garbage to a chemist might make complete sense to a particle physicist, and a particle physicist might be lost with some of the the computing theory notation.