How do you get 3D gradient direction and magnitude ?

5 visualizaciones (últimos 30 días)
Gary Tsui
Gary Tsui el 16 de Nov. de 2013
Comentada: Youssef Khmou el 16 de Nov. de 2013
Hi all,
I know that we can get the magnitude and direction from 2D gradient ?
1) mag(Gx,Gy) = sqrt ( Gx^2 + Gy^2 )
2) angle(Gx, Gy) = tan^-1 (Gy/Gx)
What about in 3D?
1) mag(Gx,Gy,Gz) = sqrt ( Gx^2 + Gy^2 + Gz^2 )
2) angle(Gx,Gy,Gz) = ???
I seriously need your help. Many, many thanks, Gary

Respuestas (1)

Matt J
Matt J el 16 de Nov. de 2013
I'd probably define direction this way
angle(Gx,Gy,Gz) = [Gx,Gy,Gz]/mag(Gx,Gy,Gz)
  2 comentarios
Gary Tsui
Gary Tsui el 16 de Nov. de 2013
Hi Matt, thanks, would you please further elaborate on the definition of [Gx,Gy,Gz]?
Youssef  Khmou
Youssef Khmou el 16 de Nov. de 2013
Gi, is the ith matrix

Iniciar sesión para comentar.

Categorías

Más información sobre Mathematics and Optimization en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by