The user enters a character vector (in the edit text field of Appdesigner). I want to convert it into a function handle. I am doing this by concatenating it with '@(x,y)', making the function compatible with matrices and then using str2func. However, I want to be able to check if the input by the user is valid. Also, the function entered by the user must have its variables as x and/or y only.
For example, if the entered input is 'log(x)+sin(y)' the entry is valid whereas if the input is 'log(x)+*sin(y)' it should show an error.