以八度画线

发布于 2024-12-25 16:42:33 字数 74 浏览 0 评论 0原文

可以用plot或plot3画八度线吗?

我的意思是,用点定义一个矩阵并自动将它们成对绘制。

提前致谢。

Is possible to draw lines in octave with plot or plot3?

I mean, to define a matrix with points and plot them in pairs automatically.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不离久伴 2025-01-01 16:42:33

是的,在 Octave 中画线非常容易。顺便说一句,它与 Matlab 中的相同。

当你说你有一个“带点的矩阵”时,我假设你的意思是 anx 2 矩阵。如果矩阵称为“点”,那么您只需执行“plot(points(:,1),points(:,2),'-')”。如果你有一个 2 xn 矩阵,你会做“plot(points(1,:),points(2,:),'-')”。

Yes, it's very easy to draw lines in Octave. It is, by the way, the same as in Matlab.

When you say that you have a "matrix with points" I assume you mean a n x 2 matrix. If the matrix is called "points" then you would simply do "plot(points(:,1), points(:,2), '-')". If you have a 2 x n matrix you would do "plot(points(1,:), points(2,:), '-')".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文