% Plot 3D quiver
% 流体场或电磁场
figure (3)
hold on
% quiver3(xx,yy,zz,Ax,Ay,Az,1,'b-')
% quiver3
%
%
% 3-D quiver or velocity plot
%
%
%
%
% GUI Alternatives
%
%
% To graph selected variables, use the Plot Selector in the Workspace Browser, or use the Figure Palette Plot Catalog. Manipulate graphs in plot edit mode with the Property Editor. For details, see Plotting Tools — Interactive Plotting in the MATLAB Graphics documentation and Creating Graphics from the Workspace Browser in the MATLAB Desktop Tools documentation.
% Syntax
% quiver3(x,y,z,u,v,w)
% quiver3(z,u,v,w)
% quiver3(...,scale)
% quiver3(...,LineSpec)
% quiver3(...,LineSpec,'filled')
% quiver3(axes_handle,...)
% h = quiver3(...)
% Description
%
%
% A three-dimensional quiver plot displays vectors with components (u,v,w) at the points (x,y,z), where u,v,w,x,y, and z all have real (non-complex) values.
%
% quiver3(x,y,z,u,v,w) plots vectors with components (u,v,w) at the points (x,y,z). The matrices x,y,z,u,v,w must all be the same size and contain the corresponding position and vector components.
%
% quiver3(z,u,v,w) plots the vectors at the equally spaced surface points specified by matrix z. quiver3 automatically scales the vectors based on the distance between them to prevent them from overlapping.
%
% quiver3(...,scale) automatically scales the vectors to prevent them from overlapping, and then multiplies them by scale. scale = 2 doubles their relative length, and scale = 0.5 halves them. Use scale = 0 to plot the vectors without the automatic scaling.
%
% quiver3(...,LineSpec) specifies line type and color using any valid LineSpec.
%
% quiver3(...,LineSpec,'filled') fills markers specified by LineSpec.
%
% quiver3(axes_handle,...) plots into the axes with the handle axes_handle instead of into the current axes (gca).
%
% h = quiver3(...) returns a vector of line handles.
%
% Plot the surface normals of the function .
[X,Y] = meshgrid(-2:0.25:2,-1:0.2:1);
Z = X.* exp(-X.^2 - Y.^2);
[U,V,W] = surfnorm(X,Y,Z);
quiver3(X,Y,Z,U,V,W,0.5);
hold on
surf(X,Y,Z);
colormap hsv
view(-35,45)
axis ([-2 2 -1 1 -.6 .6])
hold off
% Examples
% Plot the surface normals of the function .
[X,Y] = meshgrid(-2:0.25:2,-1:0.2:1);
Z = X.* exp(-X.^2 - Y.^2);
[U,V,W] = surfnorm(X,Y,Z);
quiver3(X,Y,Z,U,V,W,0.5);
hold on
surf(X,Y,Z);
colormap hsv
view(-35,45)
axis ([-2 2 -1 1 -.6 .6])
hold off
基于MATLAB实现的在流场中和电磁场中有必要画出箭头图来进一步显示清楚+使用说明文档.zip
版权申诉
7 浏览量
2024-05-22
18:04:43
上传
评论
收藏 14KB ZIP 举报
IT狂飙
- 粉丝: 4779
- 资源: 2640
最新资源
- VMware vCenter Server 7.0U3r安装ISO的度盘地址,由Patch界面提供,产品界面仍然为7.0U3p
- python脚本-批量修改文件后缀
- VMware vCenter Server 8.0U2d安装ISO的度盘地址,由Patch界面提供,下载界面仍然为8.0U2c
- bge-reranker-base本地模型
- 前端学习笔记,做一个简单的网站-学生成绩.HTML
- go语言实现的简单搜索引擎demo,使用了redis,colly,gin-gonic等技术
- 基于时空图卷积(ST-GCN)的骨骼动作识别(python源码+毕业设计).zip
- JAVAEE开发+MyBatis+Spring+SpringMVC+个人博客管理系统+用于发布日志和博客
- 毕业设计 基于Python时空图卷积(ST-GCN)的骨骼动作识别源码+模型+示例效果图+全部数据资料(优秀项目).zip
- eNSP安装必备工具(包括eNSP、VirtualBox、WinPcap、Wireshark)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈