Gradient of a vector
显示 更早的评论
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
采纳的回答
更多回答(1 个)
Image Analyst
2013-8-28
0 个投票
Wouldn't it be diff(Z) ./ sqrt(diff(X).^2 + diff(Y).^2) or something pretty similar to that?
类别
在 帮助中心 和 File Exchange 中查找有关 Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!