gpt4 book ai didi

matlab - 在 Matlab 中填充复平面中的区域

转载 作者:行者123 更新时间:2023-12-03 23:43:35 26 4
gpt4 key购买 nike

所以我绘制了由 fimplicit 隐式定义的函数在 Matlab 中。我想填充里面的区域。怎么做?

f1=@(x,y) (1+x+x.^2-y.^2).^2+(y+2.*x.*y).^2-1;

fimplicit(f1)
hold on
axis([-1.5 0.5 -1.5 1.5])
xlabel('Re(h\lambda)')
ylabel('Im(h\lambda)')
hold off
enter image description here

最佳答案

只需使用 fill 输入由 XData 给出和 YData ImplicitFunctionLine 的属性对象产生于 fimplicit :

f1 = @(x,y) (1+x+x.^2-y.^2).^2+(y+2.*x.*y).^2-1;
h = fimplicit(f1, 'linewidth', 1);
hold on
axis([-1.5 0.5 -1.5 1.5])
xlabel('Re(h\lambda)')
ylabel('Im(h\lambda)')
fill(h.XData, h.YData, 'b', 'FaceAlpha', .1)
enter image description here

关于matlab - 在 Matlab 中填充复平面中的区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64298271/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com