我需要将这些命令一起使用。问题是输出不是黑色。
contour(f',[0.002]);
az = 90;
el = 90;
view(az, el);
axis off
set(gcf,'color',[1 1 1]);
我也尝试过。
[C,h] = contourf(f');
Cld = get(h, 'Children');
for j=1:length(Cld)
if strcmp(get(Cld(j), 'Type'), 'patch')
Iso = get(Cld(j), 'CData');
if Iso<-.00002
set(Cld(j), 'cdata', 0);
elseif Iso>=-.00002 && Iso<0.00002
set(Cld(j), 'cdata', 0);
end
end
end
但它提供了所有轮廓,而我只需要一个具有特定值的轮廓,即0.002。非常感谢您的帮助。