Refer to wave using string

Hi,

I have a small problem, i would appreciate if you could help me. I have created several waves with different names compiled from a string. I would like to copy data into them.

string w_name = "half_period_" + num2str(i)
MAKE/D/N=(i+1) $(w_name)

For(...)
w_name[k]=original_wave[k] //here i get a error because igor sees a string, not a wave
Endfor
After the Make operation use

Wave w = $w_name

to get the wave reference. You can then use w to refer to the wave. See Wave in the help files for details.
In case you have a recent enough Igor version, you can also write
string w_name = "half_period_" + num2str(i)
MAKE/D/N=(i+1) $(w_name)/Wave=w
// now the wave reference w points to $(w_name)

which looks even tidier.