How to perform partial differentiation of a 480x640 matrix?

조회 수: 1 (최근 30일)
Gregor Lees
Gregor Lees 2016년 2월 8일
댓글: Guillaume 2016년 2월 9일
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

답변 (1개)

Star Strider
Star Strider 2016년 2월 8일
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
Gregor Lees
Gregor Lees 2016년 2월 9일
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 2016년 2월 9일
Type
doc gradient
at matlab command prompt to see the documentation and see that it returns both partial differentials at once.

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

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by