get the name of the wave on the top graph
fay.tor
What this simple method does not work in my function :
myWave = WaveName("",0,1)
WaveStats/R= [pcsr(A), pcsr(B)] myWave
WaveStats/R= [pcsr(A), pcsr(B)] myWave
Each time I really tried to start programming in Igor then I give up.
Thank you
WaveStats/R=[pcsr(A), pcsr(B)] $wname
But this could fail if the wave is in some data folder other than the current data folder. That's because WaveName returns just the name of the wave, not the full data folder path to the wave. The more modern and reliable method is like this:
Wave w = WaveRefIndexed("", 0, 1)
WaveStats/R=[pcsr(A), pcsr(B)] w
end
You can combine that into a single line:
WaveStats/R=[pcsr(A), pcsr(B)] WaveRefIndexed("", 0, 1)
and that line doesn't have to be in a user-defined function.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
February 9, 2015 at 09:45 am - Permalink
February 10, 2015 at 01:57 am - Permalink