小编Pau*_*hoi的帖子

在简单的xy图中连接最终点和初始点(绘制闭合曲线/多边形)

比方说,我有......

x = [1 1 2 2];
y = [1 2 2 1];
plot(x, y, 'b-');
Run Code Online (Sandbox Code Playgroud)

我将得到一个连接点(1,1),(1,2)和(2,2)的线图.有没有办法将最后一点与第一点连接起来,从而完成情节上的方块?

我也用点数拉出文本行,所以简单地添加另一个点1,1不是一个选项.

graphics matlab plot 2d matlab-figure

6
推荐指数
1
解决办法
6190
查看次数

标签 统计

2d ×1

graphics ×1

matlab ×1

matlab-figure ×1

plot ×1