Hi,
I have Co-ordinates 4 X and 4 Y different values ,so i need to compute single value.
Example : left_x = 20; left_y = 40; right_x =23;right_y =44; bottom_x=44;bottom_y=33;upper_x=122;upper_y= 87; so how to make single value any idea please let me know ?

4 件のコメント

Mischa Kim
Mischa Kim 2014 年 2 月 12 日
I am not sure I understand. Could you please elaborate?
SAMEER ahamed
SAMEER ahamed 2014 年 2 月 12 日
編集済み: SAMEER ahamed 2014 年 2 月 12 日
Hi, below i have described like Example : left_x = 20; left_y = 40; right_x =23;right_y =44; bottom_x=44;bottom_y=33;upper_x=122;upper_y=87; Example out put : 123 (compute single value).. Note : can I have used compute distance value? pos =[x1 x1 ;y1 y2]; Dist = dist(pos);% here i got result like 76 88 77 43 ,but i need to get single value.
Mischa Kim
Mischa Kim 2014 年 2 月 12 日
So you are having two 4-by-1 vectors called x and y and you would like to compute their eucledean distance?
SAMEER ahamed
SAMEER ahamed 2014 年 2 月 13 日
Yes , I have two 4-by-1 vectors how i can get single value ?

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

 採用された回答

Walter Roberson
Walter Roberson 2014 年 2 月 13 日

0 投票

sqrt(sum((x(:)-y(:)).^2))

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeProgramming についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by