MATLAB-octave中平面向量场图的可视化

quiver,平面向量场图
[x, y, z] = peaks(20);
[u, v] = gradient(z);
contour(x, y, z, 10);
hold on, quiver(x,y,u,v); hold off
axis image %令x与y的长度相等
 
在octave-3.6.4-gcc4.6.2中可运行后可得结果:
原文地址:https://www.cnblogs.com/CodeWorkerLiMing/p/3706489.html