
How to create waves with sequential name in a loop and use them as a variable in another loop?

Kzai
I want to make waves with names like wave1,wave2...........wave50 in a loop.
For this I wrote
Function data()
string name ="wave"
string U
variable i
for(i=1;i<30;i+=1)
sprintf U, "%s%d", name, i //Here It makes wave 1 wave2..etc
//print U //upto this it is working fine and printing wave 1 wave2.............wave30
make/N= (100) U //this i wrote to make waves with the names stored in U, but its showing error
endfor
end
Can you please suggest me How to write this properly and then further use them in a loop as a variable.
Problem2.
suppose after making this (size=100*1) N no of waves I want to concatenate each of them with my y and z waves to make a triple wave in a loop.Is there any way to do it in a loop or I have to write N separate concatenate command?
Execute these commands to read about the underlying concepts:
October 26, 2013 at 09:09 am - Permalink
October 26, 2013 at 11:12 pm - Permalink