MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   【求助】请教大侠 (https://www.labfans.com/bbs/showthread.php?t=1489)

labfansyao 2008-03-01 10:01

【求助】请教大侠
 
函数如下:
function threshold(t) %t从0到1取值
if nargin==0
t=0.7;
end
[x,y,z,v]=flow;
v_min=min(v(:));v_max=max(v(:));
value=v_min+(v_max-v_min)*t;
str=strcat('surface value=',num2str(value));
title(str);
hpatch=patch(isosurface(x,y,z,v,value));
isonormals(x,y,z,v,hpatch);
set(hpatch,'facecolor','red','edgecolor','none');
daspect([1,4,4]);%注意调整此处
view([65,20]);
axis tight;
camlight left;
set(gcf,'renderer','zbuffer');
lighting phong;


所获得的等值面两侧的v值肯定是一大一小,目前等值面无论从哪个方向看上去都是红色(red),所以从图中看不出等值面两侧的v值谁大谁小,可不可以将等值面的两侧设置成不同的颜色?


所有时间均为北京时间。现在的时间是 10:55

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.