Thanks for the input. I should have noted I'm using MCad 14. FYI, I've included function descriptions of what I discussed in my original question. My data file is large, so I'm not sure how to attach the MCad file showing the characteristics I'm dealing with. I should add that the data was recorded at 100Hz sample rate for about 6 minutes. Over the whole 6 minute period the expected sinusoid will have completed ony 60 degrees of the 360 degree period. This was my reasoning to justify using the median filter prior to curve fitting.
---------
The LeastSquaresFit solver gives the most flexibility for solving nonlinear regression problems. It allows you to enter constraint equations for any of the dependent parameters, lower and upper bounds on parameters, standard deviations on the x values, as well as a confidence limit for the calculation. With so many arguments, it's best to explain this function by example.
LeastSquaresFit(vx, vy, F, guess, conf, [Stdy], [LBUB], [Acc]) Takes real vectors vx and vy of identical length, a fitting function F(x,b) of one variable with an arbitrary number of parameters, b, a guess vector with one guess value for each parameter, the desired confidence limit conf, expressed as a number between 0 and 1, inclusive. An additional optional vector of standard deviations in y, Stdy, the same length as vy, an optional two-column matrix of lower and upper bounds on the parameters, LBUB, with the same number of rows as guess; and an optional convergence accuracy Acc, may be specified. Returns a three-column matrix, where the first column contains the values for the fitted parameters, and the second and third columns contain the left and right boundaries, respectively, for the confidence interval on the parameters.
-----------
medfilt1d, however, is not equivalent to a linear filter.
� medfilt1d differs from the Mathcad function medsmooth. It can work on either vectors or matrices, does not smooth the residuals and add the result to the smoothed data, and it handles the beginning and end of the signal by using an effective filter length that guarantees that the filter is completely contained inside signal.
Median filtering replaces each element of the input with the median of the element and n-1 of its neighbors, or fewer near the ends of the signal: a good method for smoothing while maintaining edges, as well as for noise reduction. The function takes some time on large matrices because it performs a sort at each pixel. In addition to removing the noise, median filtering also tends to remove sharp, small transients from a signal. Median filtering is a good way to filter certain types of noise, like random salt-and-pepper noise, because it does not change the intensity levels in the signal; it only uses available levels.
-------