| 查看: 3397 | 回复: 6 | |||
shengjunjie木虫 (正式写手)
|
[交流]
如何在matlab中绘制含有三个参数方程的三维图形 已有1人参与
|
|
如下面公式 对matlab不是很熟悉,想根据这个公式绘制如下三维图,其中c是常数,可以去1或者100、1000等,该如何编程,谢谢 [ Last edited by shengjunjie on 2011-4-15 at 09:33 ] |
» 猜你喜欢
反铁磁体中的磁性切换:两种不同的机制已成功可视化
已经有0人回复
求标准粉末衍射卡号 ICDD 01-076-1802
已经有0人回复
物理学I论文润色/翻译怎么收费?
已经有168人回复
新西兰Robinson研究所招收全奖PhD
已经有0人回复
石墨烯转移--二氧化硅衬底石墨烯
已经有0人回复
笼目材料中量子自旋液体基态的证据
已经有0人回复
数学教学论硕士可以读数学物理博士吗?
已经有0人回复
德国亥姆霍兹Hereon中心汉堡分部招镁合金腐蚀裂变SCC课题方向2026公派博士生
已经有4人回复
澳门大学 应用物理及材料工程研究院 潘晖教授课题组诚招博士后
已经有11人回复
» 本主题相关价值贴推荐,对您同样有帮助:
pET20b是否含有lac operator序列
已经有5人回复
如何判断材料的磁性是软磁还是永磁
已经有9人回复
深色药品溶解度如何做?
已经有14人回复
内地211与沿海二本,如何选择?
已经有17人回复
如何确定购买的纳米银中银的含量?
已经有5人回复
转化率接近100%的反应如何考察扩散对动力学的影响
已经有3人回复
请问如何找到美国环保署(EPA)的VOCs排放标准,比如异丙醇等,非常感谢!!1
已经有5人回复
如何在FDA下载药品申报材料
已经有6人回复
[求助]matlab画一个非参数方程的三维图形
已经有3人回复
如何在matlab中绘制三维立体图
已经有13人回复
origin怎么用已知方程画出三维图
已经有8人回复

★
小木虫(金币+0.5):给个红包,谢谢回帖
小木虫(金币+0.5):给个红包,谢谢回帖
|
【1】ezimplot3 存储该M文件,并将文件路径设置为matlab当前路径 function h = ezimplot3(fun,domain,n,color) % EZIMPLOT3 Easy to use 3D implicit plotter. % EZIMPLOT3(FUN) plots the inline function FUN(X,Y,Z) = 0 over the % default domain -2*PI < X < 2*PI, -2*PI < Y < 2*PI, -2*PI < Z < 2*PI. % % EZIMPLOT3(FUN,DOMAIN)plots FUN over the specified DOMAIN instead of the % default domain. DOMAIN can be the vector [XMIN,XMAX,YMIN,YMAX,ZMIN,ZMAX] % or the vector [A,B] (to plot over A < X < B, A < Y < B, A < Z < B). % % EZIMPLOT3(...,N) plots FUN over the default domain using an N-by-N grid. % The default value for N is 60. % % Example % Plot x^3+exp(y)-cosh(z)=4 % % via a string: f='x^3+exp(y)-cosh(z)-4' % ezimplot3(f) % % via a vectorized function handle: f = @(x,y,z) x.^3+exp(y)-cosh(z)-4 % ezimplot3(f) % % Note: this function do not use the ezgraph3 standard, like ezsurf, ezmesh % ,etc, does. Because of that, ezimplot3 only tries to imitate that % interface. A future work must be to modify the ezgraph3 to include a % routine for implicit surfaces based on this file % % Inspired by works of: A.Jutan UWO 02-02-98 ajutan@julian.uwo.ca % Made by: G.Morales UC 03-20-09 gmorales@uc.edu.ve % if nargin == 1 domain = [-2*pi, 2*pi]; % default domain: -2*pi < xi < 2*pi n = 60; % default grid size elseif nargin == 2 n = 60; % just default grid end if size(domain,2) == 2 domain = repmat(domain,1,3); %domain repeated in all variables end xm = linspace(domain(1), domain(2), n); % generating the volume data ym = linspace(domain(3), domain(4), n); zm = linspace(domain(5), domain(6), n); [x,y,z] = meshgrid(xm, ym, zm); if ischar(fun) fun = inline(vectorize(fun)); % making sure string "fun" is vectorized fvalues = feval(fun,x,y,z); % evaluating "fun" in domain elseif isa(fun,'function_handle') fvalues = fun(x,y,z); % evaluating "fun" in domain fun = char(fun); fun = fun(9:end); % pre-formatting of graph title end h = patch(isosurface(x,y,z, fvalues, 0)); %"patch" handles the structure %sent by "isosurface" isonormals(x,y,z,fvalues,h) %Recalculating the isosurface normals based on %the volume data set(h,'FaceColor','red','EdgeColor','none'); xlabel('x');ylabel('y');zlabel('z');% naming the axis alpha(0.8) % adjusting for some transparency grid on view(3) axis equal camlight lighting gouraud title([strrep(char(fun),'.','') ' = 0']); % graph title without "." 【2】在matlab命令窗口中输入 f='x-y*(y+1)*(z^(-2)-z^(-8))*x^2+(y+1)^2*(z^2-z^(-4))^3/100' 这里c我给取了10,所以c^2=100 |

2楼2011-04-21 09:41:30

3楼2011-04-21 09:44:06
shengjunjie
木虫 (正式写手)
- 应助: 0 (幼儿园)
- 金币: 3613
- 散金: 208
- 红花: 2
- 帖子: 320
- 在线: 128.7小时
- 虫号: 988929
- 注册: 2010-04-04
- 性别: GG
- 专业: 橡胶及弹性体

4楼2011-04-21 09:48:33
shengjunjie
木虫 (正式写手)
- 应助: 0 (幼儿园)
- 金币: 3613
- 散金: 208
- 红花: 2
- 帖子: 320
- 在线: 128.7小时
- 虫号: 988929
- 注册: 2010-04-04
- 性别: GG
- 专业: 橡胶及弹性体

5楼2011-04-21 09:56:52

6楼2011-04-21 12:37:10
shengjunjie
木虫 (正式写手)
- 应助: 0 (幼儿园)
- 金币: 3613
- 散金: 208
- 红花: 2
- 帖子: 320
- 在线: 128.7小时
- 虫号: 988929
- 注册: 2010-04-04
- 性别: GG
- 专业: 橡胶及弹性体

7楼2011-04-22 12:41:46












回复此楼