same string and wave name in function
nicha
variable i
wave d_int
string word = "diurnal_"
for(i=0;i<24;i+=1)
string di = word + num2str(i)
Make/ N = 974 $di
$di = d_int[p*24+i]
endfor
End
This is my function. I tried to separate the wave d_int into 24 waves. However, the wave name is in form of string. So when i compile, the 8th line, "$di = d_int[p*24+i]", was error.
Thanks so much
You have to use a wave reference here:
variable i
wave d_int
string word = "diurnal_"
for(i=0;i<24;i+=1)
string di = word + num2str(i)
Make/N = 974 $di
wave ww = $di
ww = d_int[p*24+i]
endfor
End
A.
August 31, 2010 at 03:41 am - Permalink
August 31, 2010 at 08:21 pm - Permalink
variable i
wave d_int
string word = "diurnal_"
for(i=0;i<24;i+=1)
string di = word + num2str(i)
Make/N = 974 $di/WAVE=ww
ww = d_int[p*24+i]
endfor
End
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
September 1, 2010 at 10:33 am - Permalink