changing scaling of several waves at once
epiphenom
Fri, 06/21/2013 - 12:30 pm
I would like to change the units of a wave from mV to uV(y value) without changing the x-value. I am currently doing it manually to each wave using wave arithmetic and dividing by a constant but I was wondering if someone could suggest a quicker way since I have to do this on about 90 waves in the same folder, for many folders and it's taking up a lot of time.
Thanks for your time.
string list = wavelist("*", ";", "")
variable i
for(i=0; i<itemsinlist(list); i+=1)
wave w = $(stringfromlist(i, list, ";"))
w*=1000 //multiply by 1000 for mV to micro-volt conversion
endfor
end
you can add more code to auto process multiple folders, or, you could have the function accept a string parameter which would be the folder name, just some ideas.
June 21, 2013 at 01:28 pm - Permalink
w /= 1000
, eh?John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
June 21, 2013 at 02:12 pm - Permalink
The command to enter in the dialog box would be "%s /= 1000" (without the quotes), or maybe "%s *= 1000", depending on what is meant by changing the units from mV to uV.
June 22, 2013 at 05:23 am - Permalink
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
June 24, 2013 at 09:50 am - Permalink