
Looping folders to extract elements of waves?

williamychuang
I am relatively new to Igor programming, and I am trying to do the following:
I have the data structure as following:
root:data:traces:Par1
root:data:traces:Par2
root:data:traces:Par3
...
root:data:traces:ParN
Par1 to ParN are waves. and I hope to write a script that extract the elements for all Par, one element at a time. What is the right language to loop data folder? Greatly appreciated if you can help out. My current code is as attached. Thanks.
Thanks,
William
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
April 1, 2014 at 01:40 pm - Permalink
Thanks for your reply. However, I am still confused about getting the elements of data in a loop.
Say my data is in root:data:Par1:raw and root:data:Par2:raw, raw are waves with 3 elements.
Since I want to loop both the Par# and then elements within the raw of that Par#, I try something like this:
NVAR temp=root:data:Par+num2str(i)+:raw(j) // where i and j are the for loop variables, i for Par# looping, and j for raw element looping
--> basically, I want to extract the element from root:data:Par"i":raw(j)
But this doesn't work, and I wonder how to do this correctly. Thanks again.
William
April 1, 2014 at 07:33 pm - Permalink
April 1, 2014 at 09:57 pm - Permalink
April 3, 2014 at 06:10 pm - Permalink