# I plotted this and i want to measure the length and analyze the section of this plot

10 views (last 30 days)
Firas Guechchati on 14 Oct 2020
Commented: Firas Guechchati on 20 Oct 2020
This is the part that i want to analyze and measure,its just an example
Is there a way to analyze this?
thank you for your attention
##### 1 CommentShowHide None
Firas Guechchati on 20 Oct 2020

Sign in to comment.

### Answers (1)

Ameer Hamza on 14 Oct 2020
Do you have x and y values of the line and the x values of the end-points? If yes, you can use logical indexing
x; % vector of all x-values
y; % vector of all y-values
x1; % left en-point
x2; % right end-point
idx = (x1 < x) & (x < x2);
x_vals = x(idx);
y_vals = y(idx); % x and y values you want
##### 7 CommentsShowHide 6 older comments
Firas Guechchati on 19 Oct 2020
i have an idea
what if i determine the max slope and the min slope,and these are my values that i want

Sign in to comment.

### Categories

Find more on Smoothing 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!

Translated by