Extracting values from text waves

Hello all,

I am fairly new in using IGOR Pro. What I want to obtain is: from a 2D text wave I want to extract 2 numbers and store them in 2 variables so I can use them later in various calculations.

The attached image is an example. From this one I want to obtain the numeric values corresponding to pict_details[2][4] and pict_details[11][4].

Does anyone know how to do this?

Thank you.
Here is a solution:

Function TwoDTextWaveToNumber(tw, row, column)
    Wave/T tw               // Assumed 2D
    Variable row, column    // Zero-based
   
    String text = tw[row][column]
    Variable number = str2num(text)
    return number  
End

Thank you for the solution but when I try to compile it I get this error:

got "tw" instead of a string variable or string function name

Thank you
Catalin B. wrote:

got "tw" instead of a string variable or string function name

Check you have the "/T" in the wave declaration.
I got it finally. I was using "Duplicate" and I should have chosen the /T flag with this operation also.

Thank you very much for your help.