Effacer les filtres
Effacer les filtres

find angle between lines

14 vues (au cours des 30 derniers jours)
OriAlpha
OriAlpha le 25 Déc 2018
Modifié(e) : madhan ravi le 25 Déc 2018
hello
i need to find the angles between lines
how can i do in code
  1 commentaire
John D'Errico
John D'Errico le 25 Déc 2018
Modifié(e) : John D'Errico le 25 Déc 2018
As a hint:
That will suffice. Why not try it?
Or, you could find the inclination of each line, best done using atan2. Then subtract. That too will work, as long as you are careful.

Connectez-vous pour commenter.

Réponse acceptée

madhan ravi
madhan ravi le 25 Déc 2018
  5 commentaires
OriAlpha
OriAlpha le 25 Déc 2018
dont get me wrong can u formulate for 3 points
madhan ravi
madhan ravi le 25 Déc 2018
Modifié(e) : madhan ravi le 25 Déc 2018
x = [800 905]; % common point
y = [250 330];
a = [800 905]; % common point
b = [825 333];
angle_between = (atan((y(2)-y(1))/(x(2)-x(1)))...
- atan((b(2)-b(1))/(a(2)-a(1)))) * 180/pi % in degrees

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by