| 查看: 657 | 回复: 6 | |||
| 当前主题已经存档。 | |||
[交流]
【求助】函数图像绘制【已完成】
|
|||
|
请教各个 怎么会出如下函数的图像,函数如附件: [ Last edited by nono2009 on 2009-9-23 at 22:21 ] |
» 猜你喜欢
请问有评职称,把科研教学业绩算分排序的高校吗
已经有6人回复
2025冷门绝学什么时候出结果
已经有6人回复
Bioresource Technology期刊,第一次返修的时候被退回好几次了
已经有7人回复
真诚求助:手里的省社科项目结项要求主持人一篇中文核心,有什么渠道能发核心吗
已经有8人回复
寻求一种能扛住强氧化性腐蚀性的容器密封件
已经有5人回复
请问哪里可以有青B申请的本子可以借鉴一下。
已经有4人回复
请问下大家为什么这个铃木偶联几乎不反应呢
已经有5人回复
天津工业大学郑柳春团队欢迎化学化工、高分子化学或有机合成方向的博士生和硕士生加入
已经有4人回复
康复大学泰山学者周祺惠团队招收博士研究生
已经有6人回复
AI论文写作工具:是科研加速器还是学术作弊器?
已经有3人回复
2楼2009-06-30 09:38:16
3楼2009-06-30 10:07:43
hitzhang
木虫 (正式写手)
- 仿真EPI: 1
- 应助: 0 (幼儿园)
- 贵宾: 2.15
- 金币: 1376.7
- 散金: 969
- 红花: 8
- 帖子: 862
- 在线: 226.4小时
- 虫号: 390575
- 注册: 2007-06-02
- 性别: GG
- 专业: 无机非金属类电介质与电解
4楼2009-06-30 12:35:25
hitzhang
木虫 (正式写手)
- 仿真EPI: 1
- 应助: 0 (幼儿园)
- 贵宾: 2.15
- 金币: 1376.7
- 散金: 969
- 红花: 8
- 帖子: 862
- 在线: 226.4小时
- 虫号: 390575
- 注册: 2007-06-02
- 性别: GG
- 专业: 无机非金属类电介质与电解
★ ★ ★
kuhailangyu(金币+3,VIP+0):很好,很强大,很是感谢! 6-30 16:07
kuhailangyu(金币+3,VIP+0):很好,很强大,很是感谢! 6-30 16:07
|
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 "." |
5楼2009-06-30 12:36:02
6楼2009-06-30 14:29:21
7楼2009-07-01 09:50:06













回复此楼