MATLAB-octave中3维向量场图的可视化

quiver3,空间向量场图
[x, y] = meshgrid(-2:0.2:2, -1:0.1:1);
z = x.*exp(-x.^2-y.^2);
[u, v, w] = surfnorm(x, y, z); %找出与曲面上各个点垂直的向量(u, v, w),注意已经归一化
quiver3(x, y, z, u, v, w);
hold on, surf(x, y, z); hold off
axis equal
%colormap('default')
 
MATLAB-octave中3维向量场图的可视化_第1张图片
参考:http://anony3721.blog.163.com/blog/static/51197420119695025932/

你可能感兴趣的:(MATLAB-octave中3维向量场图的可视化)