gradient issue for matlab

조회 수: 5 (최근 30일)
ABDULLA RAHIL
ABDULLA RAHIL 2019년 4월 24일
댓글: ABDULLA RAHIL 2019년 4월 24일
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.

채택된 답변

KSSV
KSSV 2019년 4월 24일
편집: KSSV 2019년 4월 24일
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
ABDULLA RAHIL
ABDULLA RAHIL 2019년 4월 24일
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)

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

추가 답변 (1개)

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

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by