Please Help: working with text waves
Fri, 07/16/2021 - 03:56 pm
I have two tasks I need to complete with text waves (which I've never figured out how to work with very well in Igor). They seem simple, but they have foiled me all morning. I am working in Igor Pro 6.37.
Task 1: I have 11 separate text waves that contain different molecular formulas. I need to create one master text wave that concatenates all 11 text waves and removes the duplicates. I know how to do this for numeric waves, but can't figure out how to do it for a text wave. Please help!
Task 2: A little trickier. Now that I have created my master text wave with all the formulas identified in each of my samples, I need to populate 11 numeric waves (one for each sample) with the abundance associated with the formula. Normally I would use FindValue, but I am struggling because of the text wave. FindValue/TEXT= is asking me to put in the actual string I want it to search for, but I want it to index through the master text wave (in a for loop) and look for one string at a time. I have created a string variable and assigned it to index [i] of my master text wave, but it keeps giving me an error when I use that string variable as the FindValue TEXT. For example, if I have something like
store = masterwave[i]
I get an error using the store string variable, but if I put parentheses around "store" won't it just look for the word "store" and not the indexed string value from the text wave?
Any assistance for either of these problems is greatly appreciated. Thank you.