Comparison of data to arbitrary waveforms?

Michael.Do
Posts: 1
Joined: 2008-05-19
Location: United States

Hello,

Is there a simple way to compare one waveform against a set of others? I would like the output to be 1) a factor expressing how much the "reference" waveform has to be scaled to best fit the "test" waveform, and 2) a measure of how good the fit is. I guess I'm looking for a curve fit operation where the only free parameter is the amplitude of the reference waveform.

I could probably fit the reference waveform with a function and then fit that function to all of the test waveforms, but would prefer a direct comparison. Does such a method already exist?

Any help would be much appreciated!!

Mike


jjweimer
Posts: 239
Joined: 2007-08-14
Location: United States

Suppose your data are in RefWave and TestWave. Create the following in the procedure window:

Function ScaleFit(w,x) : FitFunc
	Wave w
	Variable x
 
	wave rw = RefWave
 
	return w[0]*rw(x)
End

Now use the Analysis:Curve Fitting menu with Function=ScaleFit, Y Data=TestWave, and X Data=_calculated_. Set the Coefficients:Coefficient Wave as _default_ and the coefficient w[0] as 1 to start the curve fit.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH


Back to top