Magnitude and direction from north and east components

18 visualizaciones (últimos 30 días)
TAPAS
TAPAS el 22 de Abr. de 2020
Comentada: TAPAS el 23 de Abr. de 2020
I have displacement data components along north and east how to find its magnitude and direction with reference to north(0-360) in matlab. The components may have same sign or opposite both possible.
  2 comentarios
Deepak Gupta
Deepak Gupta el 22 de Abr. de 2020
Hi Mithun,
Can you give sample data? And expected result.
TAPAS
TAPAS el 22 de Abr. de 2020
Let north=-0.34 east=0.54

Iniciar sesión para comentar.

Respuesta aceptada

Deepak Gupta
Deepak Gupta el 22 de Abr. de 2020
Editada: Deepak Gupta el 22 de Abr. de 2020
Hi Mithun,
You can think of North and East as your X and Y. As you have taken north as reference so use below formulas to calculate magnitude and angle.
Magnitude = sqrt(North^2+East^2);
Theta = atan((-East)/North);
I am using -East because East is 90 degree closewise to North and atan calculates angles in counter clockwise directions from reference.
Thanks,
Deepak
  5 comentarios
Deepak Gupta
Deepak Gupta el 22 de Abr. de 2020
Read comments added already and think before asking further questions. Test the code with a known values.
TAPAS
TAPAS el 23 de Abr. de 2020
Thank you

Iniciar sesión para comentar.

Más respuestas (1)

KSSV
KSSV el 22 de Abr. de 2020
If (x,y) is a componenet
m = sqrt(x^2+y^2) ; % magnitude
theta = atan(y/x) ; % direction
  2 comentarios
TAPAS
TAPAS el 22 de Abr. de 2020
What should be my y??
TAPAS
TAPAS el 22 de Abr. de 2020
And shall I get the direction from North reference?

Iniciar sesión para comentar.

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by