Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 x,y 的二维数组。第一行是 x,第二行是 y。我正在尝试在该阵列上使用 quiver 但没有成功。
如果有人知道如何绘图,那就太好了。
谢谢!
这是你要求的吗?
定义一个二维数组(每列代表 向量的分量)
MyArray = [1 2 3 4; 5 6 7 8];
提取 4 个向量的坐标:
u = MyArray(1,:); v = MyArray(2,:);
将原点定义为 4 个向量的起点:
x = zeros(1,4); y = zeros(1,4);
最后调用quiver二维向量的函数:
quiver
quiver(x,y,u,v)