Gradient of a vector
Show older comments
I have 3 vectors X(i,j);Y(i,j) and Z(i,j).Z is a function of x and y numerically. I want to plot the gradient of z with respect to x and y. Can anyone suggest me how to find the gradient in the above case? Thanks, -Bhaskar
Accepted Answer
More Answers (1)
Image Analyst
on 28 Aug 2013
0 votes
Wouldn't it be diff(Z) ./ sqrt(diff(X).^2 + diff(Y).^2) or something pretty similar to that?
1 Comment
Bhaskarjyoti
on 30 Aug 2013
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!