Info
This question is closed. Reopen it to edit or answer.
can I enter a single variable function in edit text in GUI?
1 view (last 30 days)
Show older comments
I'm currently doing a GUI for a 3D function grapher and I'm having trouble with the edit text callback. I want user to enter the parametrized function in terms of t in 3 different edit text for P, Q, R parts but I don't know how to do the callback.
0 Comments
Answers (1)
Image Analyst
on 3 Dec 2013
I don't know why an edit text would need a callback. I never use one. Since the callback never gets called until the edit text box loses focus, for example by clicking on a button or scrollbar, then why not just put the "UpdatePlot" function into it's own function and have things like scrollbars and buttons call it. I see no compelling reason for an edit text box to have a callback.
6 Comments
Walter Roberson
on 3 Dec 2013
handle_for_user_function = str2fun(['@(t) ', TextUserEntered]);
Image Analyst
on 4 Dec 2013
Sean, FYI: Yair just talked about edit box validation: http://undocumentedmatlab.com/blog/editbox-data-input-validation/
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!