MATLAB Answers

How shall I find the distance between two points and one structure combined ?

8 ビュー (過去 30 日間)
Kaleesh Bala
Kaleesh Bala 2020 年 6 月 1 日
編集済み: KSSV 2020 年 6 月 1 日
I have 2 coords and 1 structure with coords.Have to find distance between them all and put it in a struct
The below code is just for one point ( which i believe may be wroing too as it gives 3 values instaeds of one ) ,how shall i find distance of al
Candloc(1,:)= [4.9 5];
Candloc(2,:)= [15 20.1]paths.order0 = [ (1,:) ; Candloc(2,:)];
paths.order1 = [ Candloc(1,:) ;[out.l1s1.intMatrix(1,1),out.l1s1.intMatrixY(1,1)]; Candloc(2,:)];
cord_new =[paths.order1];
[rows, columns] = size(cord_new);
distances = sqrt((cord_new(:,1) - cord_new(1,1)).^2 - (cord_new(:,2) - cord_new(1,2)).^2);

  0 件のコメント

Sign in to comment.

回答 (0 件)

製品


Translated by