calculate the gradient at a point

13 ビュー (過去 30 日間)
bilal javed
bilal javed 2018 年 12 月 17 日
編集済み: Walter Roberson 2018 年 12 月 22 日
I have a situation something like this
potential gradient field f (400*600)
[gx, gy] = gradient(f);
I have to find gradient at a point say (590,50). How can I calculate it?Untitled.png

採用された回答

Walter Roberson
Walter Roberson 2018 年 12 月 17 日
[gx(590,50), gy(590,50)]
  7 件のコメント
Walter Roberson
Walter Roberson 2018 年 12 月 18 日
編集済み: Walter Roberson 2018 年 12 月 22 日
x is a column number .y is a row number . Column 590 row 50 is gx(50,590) because rows are listed first in MATLAB as I explained earlier .
bilal javed
bilal javed 2018 年 12 月 22 日
Thank you Walter Roberson, it really worked

サインインしてコメントする。

その他の回答 (1 件)

Mark Sherstan
Mark Sherstan 2018 年 12 月 17 日
Refer to the post here.
  1 件のコメント
bilal javed
bilal javed 2018 年 12 月 17 日
Thank you!
but my case is little bit different, the matrix f has all numerical values

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by