Distance from points to points.

조회 수: 1 (최근 30일)
Francesco
Francesco 2014년 2월 5일
편집: Francesco 2014년 3월 22일
It's possible to read these coordinates from a text file formatted in this way:
  댓글 수: 2
Image Analyst
Image Analyst 2014년 2월 5일
Isn't this a duplicate of http://www.mathworks.com/matlabcentral/answers/114838#answer_123302 which already has people responding?
Francesco
Francesco 2014년 2월 5일
It's not exactly the same questions.

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2014년 2월 5일
The identifier would be the row index of D.
  댓글 수: 4
Francesco
Francesco 2014년 2월 5일
Thanks. In general If I have n points I have to do this, where rows is the numbers of rows of the txt file.
[X, Y] = ndgrid(1:rows);
identifiers = arrayfun(@(X,Y) sprintf('%d_%d', X, Y), X, Y, 'Uniform', 0);
How Can I use pdist? What can I enter as input?
Walter Roberson
Walter Roberson 2014년 2월 5일
Your previous question asked about using identifiers of that form and defined what the identifiers should look like. This question asks about using linear identifiers of the form 1, 2, 3, ... 6 .... n*(n-1)/2. But you have not given any indication of how the two are to fit together.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by