Magnitude and direction from north and east components

조회 수: 15 (최근 30일)
TAPAS
TAPAS 2020년 4월 22일
댓글: TAPAS 2020년 4월 23일
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
Deepak Gupta
Deepak Gupta 2020년 4월 22일
Hi Mithun,
Can you give sample data? And expected result.
TAPAS
TAPAS 2020년 4월 22일
Let north=-0.34 east=0.54

댓글을 달려면 로그인하십시오.

채택된 답변

Deepak Gupta
Deepak Gupta 2020년 4월 22일
편집: Deepak Gupta 2020년 4월 22일
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
Deepak Gupta
Deepak Gupta 2020년 4월 22일
Read comments added already and think before asking further questions. Test the code with a known values.
TAPAS
TAPAS 2020년 4월 23일
Thank you

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

KSSV
KSSV 2020년 4월 22일
If (x,y) is a componenet
m = sqrt(x^2+y^2) ; % magnitude
theta = atan(y/x) ; % direction
  댓글 수: 2
TAPAS
TAPAS 2020년 4월 22일
What should be my y??
TAPAS
TAPAS 2020년 4월 22일
And shall I get the direction from North reference?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Geology에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by