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

8 次查看(过去 30 天)
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 个)

Ameer Hamza
Ameer Hamza 2020-10-14
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 个评论

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by