Matlab GUI edit text 'pi' and mathematical operations
Mostra commenti meno recenti
If a person decides to enter 'pi' into the edit box, is there a way to convert the string 'pi' into its numerical value? So right now the callback function looks like:
a = str2double(get(handles.editbox,'string'));
When a value is entered, e.g. '2', the function str2double converts the string '2' into its numerical value. Is it possible to achieve something like this with 'pi' or other matlab built-in constants?
Also, is there a way to input mathematical operations into the edit boxes? Say I input 'pi/2' into the text box. Is there a way to 'compute' this string and convert it to its numerical value?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Data Type Identification in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!