Question: mean() function result doesn't make sense
koensayr
How could the second one give a mean that is LOWER than the first one? wave1 are all real values.
print mean(wave1,-Inf,Inf)
735.886
print mean(wave1,1,Inf)
735.812
Thanks
Make ddd=x
•print mean(ddd,-inf,inf)
63.5
•print mean(ddd,1,inf)
64
// now change so that the first element is larger than the mean:
•ddd[0]=100
•print mean(ddd,-inf,inf)
64.2812
•print mean(ddd,1,inf)
64
I hope this helps,
A.G.
WaveMetrics, Inc.
March 7, 2012 at 03:49 pm - Permalink
March 7, 2012 at 04:57 pm - Permalink
x1 and x2 are the wave scaling indexes over which the mean is computed.
If you have point scaling, they're the indexes of the wave (array), which start at 0 (0 is the index of the first value in the wave, 1 is the second, etc).
See this Igor help topic to explain what wave scaling is and how x isn't usually the point/index number.
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
March 7, 2012 at 05:45 pm - Permalink