gradient issue for matlab

3 ビュー (過去 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.

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by