remove points in a figure that are close to 0 vertical line
3 views (last 30 days)
Show older comments
Say I have:
X = [0 0.5 0.12 0.54 0.21 0.21 0.12 0.32 37 30 39 50 42]'
Y = [134 423 352 212 545 234 184 563 323 123 485 182 493]'
plot(X,Y,'g')
I want to remove points that are less than 'n' from the plot for X
Say n = 20, so points that are less than 20 in matrix X will be removed from the plot.
0 Comments
Answers (1)
Mathieu NOE
on 29 Jan 2021
hi
as simple as this :
X = [0 0.5 0.12 0.54 0.21 0.21 0.12 0.32 37 30 39 50 42]'
Y = [134 423 352 212 545 234 184 563 323 123 485 182 493]'
n = 20;
ind=find(X>n);
plot(X(ind),Y(ind),'g')
0 Comments
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!