How can I get someone to input a function in a GUI and then work with that function?

3 ビュー (過去 30 日間)
I want to create a GUI in which the user can type in a function, f(x). I then want to go into the script editor and use their function to integrate between two values. How can I take their function and convert it into something I can use?

採用された回答

Sean de Wolski
Sean de Wolski 2013 年 5 月 23 日
Use str2func to take their string and turn it into an anonymous function.
doc str2func

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by