Solved

How to convert string to numeric value (float)?

  • 18 February 2023
  • 1 reply
  • 95 views

I wish to read values from a text file using  GETTEXTFILE . The file would have a few header lines such as: 

Interferogram between reference beam and Configuration 4
0.6328 µm at 0.0000 (deg).
Peak to Valley = 9.1730 waves, Fringes/Wave = 2.0000.
Surface: Image (image)
Exit Pupil Diameter: 1.0002E+002 Millimeters
Xtilt = 0.00, Ytilt = 0.00.

I am interested in grabbing the Peak to Valley value of  9.1730 and returning it as a numerical value to the merit function using the ZPLM Merit Function Editor Operand. 

 

While there is a way to convert numerical values to strings using the $STR() string function, would there be an equivalent command to do the reverse? 

icon

Best answer by Jeff.Wilde 18 February 2023, 02:44

View original

1 reply

Userlevel 7
Badge +3

Try using SVAL:

 

Regards,

Jeff

Reply