calculate the gradient at a point

6 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Walter Roberson
Walter Roberson il 17 Dic 2018
[gx(590,50), gy(590,50)]
  7 Commenti
Walter Roberson
Walter Roberson il 18 Dic 2018
Modificato: Walter Roberson il 22 Dic 2018
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 il 22 Dic 2018
Thank you Walter Roberson, it really worked

Accedi per commentare.

Più risposte (1)

Mark Sherstan
Mark Sherstan il 17 Dic 2018
Refer to the post here.
  1 Commento
bilal javed
bilal javed il 17 Dic 2018
Thank you!
but my case is little bit different, the matrix f has all numerical values

Accedi per commentare.

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by