Clear Filters
Clear Filters

Smooth function and keeping so,e points fixed

8 views (last 30 days)
Aviad
Aviad on 19 Jan 2015
Answered: Matt J on 19 Jan 2015
Hi, I have x and y values which I want to smooth. The thing is that I want the smooth won't change some of the y values. For example, I have 101 values and I want to smooth them, but I want that the values 1,11,21,...,91,101 stay with their original values and don't change if I smooth the vector. Is it possible to do? Thanks you.

Answers (1)

Matt J
Matt J on 19 Jan 2015
Sounds like you would want to do a curve fit to the fixed points and then evaluate the fitted curve at the remaining points. You could start with spline() or polyfit(). More complicated curve fitting is possible with the Optimization, Statistics, or Curve Fitting Toolboxes.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!