How to perform partial differentiation of a 480x640 matrix?

1 visualización (últimos 30 días)
Gregor Lees
Gregor Lees el 8 de Feb. de 2016
Comentada: Guillaume el 9 de Feb. de 2016
I have a matrix with 480 rows and 640 columns. The matrix just contains numbers. How do I perform partial differentiation with respect to x and partial differentiation with respect to y on this matrix?
I am using Matlab 2015b.
Any help would be greatly appreciated

Respuestas (1)

Star Strider
Star Strider el 8 de Feb. de 2016
I would use the gradient function. It will do what you want. It assumes a constant ‘step’ in each direction, and you can specify that step for each direction.
  2 comentarios
Gregor Lees
Gregor Lees el 9 de Feb. de 2016
ok doke, thanks. How would I change the function though from when i'm doing partial x to when i'm doing partial y?
Guillaume
Guillaume el 9 de Feb. de 2016
Type
doc gradient
at matlab command prompt to see the documentation and see that it returns both partial differentials at once.

Iniciar sesión para comentar.

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by