如何保留在圆之内的网格线。
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
我想得到一个这样的图,所以画了网格线,以及一个填充的圆,效果如图2我想把圆外的网格线去掉,得到图1的样子,应该如何做


以下是我的代码
[X,Y] =meshgrid(-6.75:1.5:6.75);
z=X*0;
mesh(X,Y,z);
figure()
h1 = mesh(X,Y,z)
%hold on
%viscircles([0,0],6,'color','r')
axis off
hold on
t = 0:0.1:2*pi;
x = 6*sin(t);
y = 6*cos(t);
patch(x,y,'g')
%axis square tight
alpha(0.5)
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!