How to get slope over each grid?
2 次查看(过去 30 天)
显示 更早的评论
I have a 3dimentional matrix , long*lat*monthly_mean_data, I want to plot slope over each grid showing the change in the data over the time for a year. can anyone help me out?
回答(1 个)
KSSV
2019-2-27
Read about gradient
A = rand(10) ;
[dx,dy] =gradient(A) ; % get x2-x1, y2-y1
m = dy./dx ; % get slope
pcolor(m)
colorbar
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!