How to do data selection from a graph to extract the evenly spaced data points ?

9 次查看(过去 30 天)
Dear peers, i would like to select or extract the data that the Y axis is more than 0.001. and then select 60 points that are evenly spaced out in the selected graph area.
for eg: The original graph is generated by matlab simulink. and would like to select the data that are in the Red rectangle.
the outcome is expected as follow: 30 data points that evenly space (closet) that are selected from each peaks.
What is the best search method to find the evenly space data points? and i would use this algorithm for different graphs.
Thank you very much

采纳的回答

KSSV
KSSV 2018-8-1
Let X and Y be your data arrays.
N = 30 ;
xi = linspace(min(X),max(X),N) ;
yi = interp1(X,Y,xi) ;
plot(xi,yi)
axis([-100 100 0 0.04])
  2 个评论
Chin Kui Ku
Chin Kui Ku 2018-8-1
thanks, I supposed that need to extract the X & Y data arrays for those points of Y>0.001. for left quadrant, and right quadrants.
and the xi & yi mentioned above are regenerated by matlab correct? however, i am interested in selecting the existing closest x & y evenly spaced points. any idea on how to do so?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graph and Network Algorithms 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by