Borrar filtros
Borrar filtros

How to do distance formula

1 visualización (últimos 30 días)
Kaden Bauernfeind
Kaden Bauernfeind el 28 de Mzo. de 2022
Comentada: VBBV el 28 de Mzo. de 2022
Im trying to find the distance between 2 points on a truss and I have the length and the x and y of the nodes on the truss but what code in matlab would make this work.

Respuestas (1)

KSSV
KSSV el 28 de Mzo. de 2022
If(x1,y1) and (X2,y2) are two points. To get the distance use the formula:
d = sqtrt((x2-x1)^2+(y2-y1)^2) ;
  3 comentarios
KSSV
KSSV el 28 de Mzo. de 2022
d = sqrt((x(:,2)-x(:,1)).^2+(y(:,2)-y(:,1)).^2) ;
VBBV
VBBV el 28 de Mzo. de 2022
+1

Iniciar sesión para comentar.

Categorías

Más información sobre Structural Analysis en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by