display variable in textbox?
titania
I want to display a variable that is calculated from another variable (PulsePeriod (from dialogue)-> Frequency) in the textbox of my graphs.
But the textbox function does not display variables
dyntext: Textbox ... \{var} does not work
printf puts it in the history.
Many thanks!
Your options are:
1. use static text in the textbox. Something like
Textbox ... tboxText
2. Make var a global variable.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
September 7, 2010 at 11:59 am - Permalink
TextBox/C/N=text0/F=0/E=2 "\\f01 nA3; Laser [Hz]:" + num2str (fre) + "[Hz]; Pulseduration: " + num2str (dur) + "[ms]"
September 8, 2010 at 06:36 am - Permalink
Alternatively ...
sprintf theText, "\\f01 nA3; Laser [Hz]: %g [Hz]; Pulseduration: %g [ms]", fre, dur
TextBox/C/N=text0/F=0/E=2 theText
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
September 8, 2010 at 08:52 am - Permalink