How to find angle between two lines?
Mostrar comentarios más antiguos
For example, there is line L1 between two points (x1,y1) and (x2,y2). Another line L2 between points (x1,y1) and (x3,y3). I want to find the angle between the lines L1, L2. How to find in MATLAB? I think in matlab there is no predefined function which performs the same.
2 comentarios
sudeep
el 7 de En. de 2024
Movida: Dyuman Joshi
el 9 de En. de 2024
TURE AND
Example 1: Find the angle between r1 = 2(1 + cost) and r23(1-cost) and plot the graph for the same.
Respuesta aceptada
Más respuestas (2)
Jos (10584)
el 21 de Oct. de 2019
0 votos
Use the dot product between the two vectors (v1 and v2) given by the four x,y pairs points.
Given the formula: dot(v1,v2) = | v1 | x | v2 | x cos(A)
I leave it to you to find the angle A using the matlab functions norm, dot and acos.
More info: https://en.wikipedia.org/wiki/Dot_product
Bjorn Gustavsson
el 21 de Oct. de 2019
0 votos
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!