I'm using matlab guide to set up a fairly basic UI for real time graphing and I would like to be able to get equations from users during run time which I will then apply to the values in my graph.
There have been several posts about using eval(stringExpression) or str2func(stringExpression) to convert a stringExpression into a function. However, the relevant posts are all from several years back so I'm wondering what is the best way to parse a string into a matlab function and if there are examples.
Unfortunately looking up the str2func and eval documentation, hasn't given me a good sense about what are acceptable input values to the two functions. If anyone knows where to find more examples that would be very helpful. Thank you!
Best Answer