How can I remove unwanted noise data., shown at the right of the red line

1 vue (au cours des 30 derniers jours)
Orange Apple
Orange Apple le 24 Mai 2022
Is there any function that is able to solve the problem?

Réponses (1)

Hiro Yoshino
Hiro Yoshino le 24 Mai 2022
  1. Define the line as a function f
  2. Given (x,y), delete the point if f(x) < y satisfies
% data
X = rand(100,2);
x = X(:,1);
y=X(:,2);
plot(x,y,'o'); hold on
% function
f = @(x) x.^2;
x2 = sort(x);
y2=sort(f(x));
plot(x2,y2); hold off
% Find the data poits that satisfies f(x) > y
idx = f(x) > y;
plot(x(idx),y(idx),'o',x2,y2,'r-');

Catégories

En savoir plus sur Time Series 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