Skip to main content
Solved

How to convert string to numeric value (float)?

  • February 17, 2023
  • 1 reply
  • 133 views

ISHFM

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? 

Best answer by Jeff.Wilde

Try using SVAL:

 

Regards,

Jeff

View original
Did this topic help you find an answer to your question?

1 reply

Jeff.Wilde
Luminary
Forum|alt.badge.img+3
  • Luminary
  • 508 replies
  • Answer
  • February 18, 2023

Try using SVAL:

 

Regards,

Jeff


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings