Using StringMatch with a text wave
Karen
I'm trying you use stringmatch with a text wave.
The data I have is from an instrument with 2 inlets which alternate between amplification and background. The software logs which inlet is being amplified at each half second interval(e.g. Operation Mode - Amplification inlet 1). I'd like to use stringmatch on the ith term in the wave containing this information.
Is this in fact possible or do I need to create a string variable and overwrite it each time?
Cheers,
Karen
make/o/n=4/t textwave = {"a", "b", "a", "b"}
Variable n
For (n=0; n<4; n+=1)
if (stringmatch(textwave[n], "a"))
printf "Row %d of wave matched \"a\".\r", n
else
printf "Row %d did *not* match \"a\".\r", n
endif
EndFor
end
October 28, 2009 at 10:29 am - Permalink