
Complex Wave Real and Imaginary Parts

ysspatil
For example,
function cWaveMean()
make/C/o/n=1000 cWave=cmplx(1+gnoise(1),2+gnoise(10))
print sum(cWave)/numpnts(cWave)
end
outputs only the average of the real part of cWave.
Defining new waves for the real and imaginary parts is time intensive.
An inbuilt function to access the real and imaginary parts would be much faster?
I am trying to get the sum of the imaginary part of cWave without calling wavestats.
The /C on the print statement says to print it as complex. You can also assign to a complex variable:
In both those cases, I get the expected: (8128,81280)
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
August 22, 2016 at 04:56 pm - Permalink
Thanks johnweeks.
August 22, 2016 at 05:21 pm - Permalink