大家好,我想从图中找到所有点并将其保存在数组中
例如我有这个图我想要从线的开头到结尾的所有点
% Drawing a Trajectory
prompt={'Enter The Number Of Lines:'}; % Enter statements at the Command Window to accept input from you.
title='Draw Line '; % Name the Command Window
n=inputdlg(prompt); % Create and open input dialog box
A = sscanf(n{1}, '%d'); % Convert from String to Int
[x,y] = ginput(A); % Graphical input from mouse or cursor
plot(x,y)
posth = [x,y]; % Save 'x' and 'y' as Array