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

조회 수: 1 (최근 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 CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by