Smooth function and keeping so,e points fixed

6 visualizaciones (últimos 30 días)
Aviad
Aviad el 19 de En. de 2015
Respondida: Matt J el 19 de En. de 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.

Respuestas (1)

Matt J
Matt J el 19 de En. de 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.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by