How to calculate distance from one point base to multipoints and save it as a row?
Show older comments
Hello Everyone,
I need your help in order to overcome my problem, here is my code:
AP_dist = zeros(N);
for i = 1:N
for j=1:1
p=line([MS_loc(i,1) AP_pos(1,1)], [MS_loc(i,2) AP_pos(1,2)],'Marker','.','LineStyle','-.');
X= [MS_loc(i,1),AP_pos(1,1);MS_loc(i,2),AP_pos(1,2)];
AP_dist= pdist(X,'euclidean')
pause(1)
end
end
Accepted Answer
More Answers (1)
Walter Roberson
on 24 Jun 2013
AP_dist(i) = pdist(X,'euclidean');
1 Comment
sarah nik
on 24 Jun 2013
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!