hello, i have a graph and i want to select some points automatically can anyone please help me. i attache the graph below and the points need to select are in circle.

3 次查看(过去 30 天)
  1 个评论
Image Analyst
Image Analyst 2021-11-26
Maybe try imchangepts(). Attach your data if you want people to try things. There are probably lots of approaches depending on how you define the points. Attach several data sets because an algorithm that works for one might not work for a different one.

请先登录,再进行评论。

回答(2 个)

Alagu Sankar Esakkiappan
I see that you're trying to highlight abrupt points in the plotted graph. This may be achieved using findchangepts to find out indices of exact points of interest. The indices may then be highlighted using plot function and utilizing its properties.
The following code may provide you further understanding:
highlightIndices = (findchangepts(lab,'MaxNumChanges',6))'; % Tinker properties of findchangepts to specify highlighting behavior
plot(cal,lab); % Original Plot without highlighting
hold on % To make changes on top of previous plot
plot(cal(highlightIndices),lab(highlightIndices),"ro","MarkerSize",15); % Highlights points with Red Circle of Radius 15

SAWANT JAYDIP
SAWANT JAYDIP 2021-11-29
I attached my exel file below and the matlab code for create graph from that exel file please find it, this will help me in my project
%% Import data from text file
% Script for importing data from the following text file:
%
% filename: F:\try for imagej\Plot Values.csv
%
% Auto-generated by MATLAB on 22-Nov-2021 10:31:09
%% Set up the Import Options and import the data
opts = delimitedTextImportOptions("NumVariables", 2);
% Specify range and delimiter
opts.DataLines = [2, Inf];
opts.Delimiter = ",";
% Specify column names and types
opts.VariableNames = ["Distance_mm", "Gray_Value"];
opts.VariableTypes = ["double", "double"];
% Specify file level properties
opts.ExtraColumnsRule = "ignore";
opts.EmptyLineRule = "read";
% Import the data
PlotValues = readtable("H:\try for imagej\Plot Values.csv", opts);
val=table2array(PlotValues)
cal= val(:,1)
lab=val(:,2)

类别

Help CenterFile Exchange 中查找有关 Statistics and Linear Algebra 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by