上一次讲了精度运算,今天说一下二维画图。例如:
x = rand(10,1);
y = rand(10,1);dt = delaunayTriangulation(x,y)triplot(dt);%% Display the Vertex and Triangle labels on the plothold onvxlabels = arrayfun(@(n) {sprintf('P%d', n)}, (1:10)');Hpl = text(x, y, vxlabels, 'FontWeight', 'bold', 'HorizontalAlignment',... 'center', 'BackgroundColor', 'none');ic = incenter(dt);numtri = size(dt,1);trilabels = arrayfun(@(x) {sprintf('T%d', x)}, (1:numtri)');Htl = text(ic(:,1), ic(:,2), trilabels, 'FontWeight', 'bold', ... 'HorizontalAlignment', 'center', 'Color', 'blue');hold off复制代码显示:
作者: curton, 来源:面包板社区
链接: https://mbb.eet-china.com/blog/uid-me-3876349.html
版权声明:本文为博主原创,未经本人允许,禁止转载!
文章评论(0条评论)
登录后参与讨论