operation on a number of wave
mwpro
I was wondering what would be the best or a good way to perform operation on a number of waves, if they are in the same data folder and if they are in different data folders. It I were to use a loop, what would be an efficient way in moving between the folders or it would just be easier if just put all waves in the same data folder? Thanks!
DisplayHelpTopic "Wave Reference Waves"
May 5, 2018 at 12:47 pm - Permalink
May 6, 2018 at 09:59 pm - Permalink
my function is as but get the expected assignment operator: =, +=, -+.. when trying to compile, what is wrong? thanks!
wave wind_direction_avg
WAVE wr
variable i
for (i=0;i<35;i=i+1)
WAVE w = wr[i]
string east = nameofwave(w) + "_east"
string west = nameofwave(w) + "_west"
duplicate/o w $east, $west
$east = wind_direction_avg < 180 && wind_direction_avg >0 ? w : nan
$west = wind_direction_avg <360 && wind_direction_avg > 180 ? w : nan
endfor
end
May 7, 2018 at 11:49 am - Permalink
wave /wave wr
May 7, 2018 at 01:19 pm - Permalink
instead of
your use of $east and $west in wave assignment statements will not work. For details, execute:
Here is an untested crack at correcting this issue:
Wave wind_direction_avg
WAVE/WAVE wr
Variable i
for (i=0;i<35;i=i+1)
WAVE w = wr[i]
string eastName = nameofwave(w) + "_east"
Duplicate/O w, $eastName
WAVE eastWave = $eastName
eastWave = wind_direction_avg < 180 && wind_direction_avg >0 ? w : nan
string westName = nameofwave(w) + "_west"
Duplicate/O w, $westName
WAVE westWave = $westName
westWave = wind_direction_avg <360 && wind_direction_avg > 180 ? w : nan
endfor
End
May 7, 2018 at 05:56 pm - Permalink
May 13, 2018 at 12:41 pm - Permalink
May 13, 2018 at 12:41 pm - Permalink
May 13, 2018 at 12:41 pm - Permalink
May 13, 2018 at 12:41 pm - Permalink
May 13, 2018 at 12:41 pm - Permalink
June 29, 2018 at 02:03 pm - Permalink