hold on; [gx,gy]=meshgrid(0:max(nelx,nely)); %产生网格数据。 plot(gx+0.5,gy+0.5,'k',gy+0.5,gx+0.5,'k','LineWidth',2); %画横线,画竖线。 axis tight; axis off; % 保证网格是方格。 axis([0 nelx+0.5 0 nely+0.5]); %设置显示范围。 %axis([0 nelx 0 nely]); %设置显示范围。 set(gcf,'color',[0.5,0.5,0.5]);%set background color = gray;
实用小程序--matlab+画网格
猜你喜欢
转载自blog.csdn.net/hjq376247328/article/details/79097468
今日推荐
周排行