PDA

View Full Version : [QwtSplineFitter] not a function as a result



zwierz
15th May 2013, 14:22
Case 0: Here is my original function:
http://www.youtube.com/watch?v=a3Ej_fjb4PE

Case 1: Here is my function after adding the code below:
http://www.youtube.com/watch?v=PihkRrS7VKs


curve->setStyle(QwtPlotCurve::Lines);
curve->setCurveAttribute(QwtPlotCurve::Fitted, true);

Case 2: Here is my function after adding some other code:
http://www.youtube.com/watch?v=dYsHEnAqPDQ


curve->setStyle(QwtPlotCurve::Lines);
curve->setCurveAttribute(QwtPlotCurve::Fitted, true);
QwtSplineCurveFitter *spline_fitter = new QwtSplineCurveFitter();
spline_fitter->setFitMode(spline_fitter->ParametricSpline);
spline_fitter->setSplineSize(1000);
curve->setCurveFitter(spline_fitter);

In case 1 function is shaking. In case 2 "function"is not a function any more because it "moves back" in time (it has more than one value for one x).

My question is: is it possible to get smoothed curve without "shaking" or losing function properties?