gradient issue for matlab

1 visualización (últimos 30 días)
ABDULLA RAHIL
ABDULLA RAHIL el 24 de Abr. de 2019
Comentada: ABDULLA RAHIL el 24 de Abr. de 2019
Hi
I am trying to use the gradient function to have dq/dv and dv /dq . The martix has one direction is q and one is v but without titles for each one. My matrix size is 47 rows and 2 column.

Respuesta aceptada

KSSV
KSSV el 24 de Abr. de 2019
Editada: KSSV el 24 de Abr. de 2019
Let A be your 47X2 matrix.
q = A(:,1) ;
v = A(:,2) ;
dq_dv = diff(q)./diff(v) ; % dq/dv
dv_dq = diff(v)./diff(q) ; % dv/dq
  1 comentario
ABDULLA RAHIL
ABDULLA RAHIL el 24 de Abr. de 2019
Hi KSSV,
Thanks for your answer, is it possible by using the equations belwo
FX = gradient(F)
[FX,FY] = gradient(F)
[FX,FY,FZ,...,FN] = gradient(F)

Iniciar sesión para comentar.

Más respuestas (1)

Image Analyst
Image Analyst el 24 de Abr. de 2019
If M is your matrix, have you tried imgradientxy()?
[gx, gy] = imgradientxy(M); % Requires Image Processing Toolbox.

Categorías

Más información sobre MRI 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