Refer to wave using string
nik09
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
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.
June 28, 2011 at 05:17 am - Permalink
MAKE/D/N=(i+1) $(w_name)/Wave=w
// now the wave reference w points to $(w_name)
which looks even tidier.
June 28, 2011 at 05:58 am - Permalink
June 28, 2011 at 08:31 am - Permalink