How to smooth the Curve

2 vues (au cours des 30 derniers jours)
Aravin
Aravin le 16 Déc 2011
Dear All,
From time analysis I get some values. Ideally my curve should monotonically increase. But due to some noice my curve get little zigzag. How Can I make my curve smooth. To understand please execute the following Code.
x = [1:100];
noice = [5:5:100];
x(noice) = x(noice) - 1;
plot(x);
How can I make my curve smooth.

Réponses (1)

Wayne King
Wayne King le 16 Déc 2011
Hi, one thing you can do is use a moving average filter:
y = filter(1/5*ones(5,1),1,x);
plot(y);

Catégories

En savoir plus sur Smoothing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by