What is the unit of distance in MATLAB

What is the unit of distance between two points such as (1,1) and (40,40) in MATLAB plot.

4 comentarios

Adam
Adam el 10 de Feb. de 2020
In what context? How are you measuring the distance? What are (1,1) and (40,40)? Did you set the x and y data of the plot yourself or are they the default values?
SUBHRADIP MUKHERJEE
SUBHRADIP MUKHERJEE el 10 de Feb. de 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 el 10 de Feb. de 2020
Editada: Adam Danz el 10 de Feb. de 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.
SUBHRADIP MUKHERJEE
SUBHRADIP MUKHERJEE el 11 de Feb. de 2020
OK, THANK YOU.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 10 de Feb. de 2020

3 votos

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 comentarios

Adam Danz
Adam Danz el 10 de Feb. de 2020
:D
Walter just made me google "Mathworks Universal Distance".
John D'Errico
John D'Errico el 10 de Feb. de 2020
Smile.

Iniciar sesión para comentar.

Categorías

Más información sobre Polar Plots en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 10 de Feb. de 2020

Comentada:

el 11 de Feb. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by