MATLAB Answers

What is the unit of distance in MATLAB

16 views (last 30 days)
SUBHRADIP MUKHERJEE
SUBHRADIP MUKHERJEE on 10 Feb 2020
What is the unit of distance between two points such as (1,1) and (40,40) in MATLAB plot.

  4 Comments

Show 1 older comment
SUBHRADIP MUKHERJEE
SUBHRADIP MUKHERJEE on 10 Feb 2020
Suppose,
x=[1, 1];
y=[40, 40];
z=sqrt((y(1) - x(1))^2 + ((y(2) - x(2))^2));
plot(x(1),x(2),'sb');hold on; plot(y(1),y(2),'sg');
xlim([0 41]); ylim([0 41]);
Now, z is an euclidean distance.
My question is, what is the unit of z.
Adam Danz
Adam Danz on 10 Feb 2020
Distance units match the units of your x and y axes which you define. If your data are in centimeters, then the distance is in centimeters. If your data are in meters, the distance is in meters, and so on.

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 10 Feb 2020
The unit of distance used by MATLAB is the MUD, which stands for Mathworks Universal Distance. The formal symbol for MUD is ? but it is mostly omitted as being understood.

  2 Comments

Adam Danz
Adam Danz on 10 Feb 2020
:D
Walter just made me google "Mathworks Universal Distance".

Sign in to comment.

Products


Translated by