I am trying to follow "Wave Assignment and Indexing Using Labels" example in the help file, with a slight modification: I am using WaveStats to generate my output variables instead of FindPeak, intended to populate a wave with 10 rows and 4 columns After setting dimension labels for the desired WaveStats output variables, the next 4 lines of code, which would place the extrema values and their row locations into the appropriate cells of the output wave, generate the error "Couldn't find the given dimension item label." I'm sure I'm missing something, ignorant of an indexing rule or something, but I can't see it. Hopefully the code posts correctly, this is my first time sharing any code on the forum.
•Make test=sin(x/30)
•WaveStats test
V_npnts= 128; V_numNaNs= 0; V_numINFs= 0; V_avg= 0.33891;
V_Sum= 43.3805; V_sdev= 0.582272; V_sem= 0.0514661;
V_rms= 0.671753; V_adev= 0.492791; V_skew= -0.643665;
V_kurt= -0.851805; V_minloc= 127; V_maxloc= 47;
V_min= -0.887431; V_max= 0.999991; V_minRowLoc= 127;
V_maxRowLoc= 47; V_startRow= 0; V_endRow= 127;
•Make/N=(10,4) metrics
•SetDimLabel 1,0,Vmin,metrics
•SetDimLabel 1,1,Vmax,metrics
•SetDimLabel 1,2,VminLoc,metrics
•SetDimLabel 1,3,VmaxLoc,metrics
Could you post the command that failed?
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
May 10, 2018 at 11:36 am - Permalink
As I suspected, it was a syntax error on my part. Your amended code contains a [0], and I guess I need to brush up more on that section of the help file. What does the [0] designate? I noticed the label assignment example doesn't include that character (code reposted below). Thank you very much for the help!
May 10, 2018 at 01:44 pm - Permalink
Your case uses a 2D wave so two indices are needed, one for the row and one for the column.
"[0]" in John's example means "row 0".
May 10, 2018 at 01:55 pm - Permalink
Thanks,
-Kevin
May 10, 2018 at 02:11 pm - Permalink