I have the scatter diagram and I want the coordinates of each point

1 回表示 (過去 30 日間)
Ang Vas
Ang Vas 2015 年 6 月 4 日
コメント済み: Ang Vas 2015 年 6 月 4 日
What I want is, if I have the scatter diagram, how can I take the coordinates of each and every point in a matrix or in a vector?
  3 件のコメント
Ang Vas
Ang Vas 2015 年 6 月 4 日
編集済み: Image Analyst 2015 年 6 月 4 日
sorry for all that mesh. Well the scatter I have it from the below code
axis ij
hold on
while any(A(:) > 0)
[r,c] = find(A>0);
offx = randn;
offy = randn;
scatter(c+offx,r+offy,'.', 'b')
A = A-1;
end
but I can't understand how to find the x,y coordinates of each point
luc
luc 2015 年 6 月 4 日
Could you add some sample A data? It seems to me the
scatter(c+offx,r+offy,'.', 'b')
line contains the X and Y data. So X_new and Y_new becomes:
New_X=c+offx;
New_Y=r+offy;

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2015 年 6 月 4 日
How did you generate the picture? If it was via MATLAB, then why don't you know the coordinates already?
Or else, call ginput() or impoints(). You will also have to click on the start and stop of the x and y axes so that you can locate the origin and a spatial calibration factor.
  2 件のコメント
Image Analyst
Image Analyst 2015 年 6 月 4 日
Regarding your clarification above...
The "x" values are c+offx,
and the "y" values are r+offy.
Ang Vas
Ang Vas 2015 年 6 月 4 日
Ops!!! you have right , thanks

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDiscrete Data Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by