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.
matlab 中的pol2cart函数应将角度和距离数组转换为[X Y]位置列表。当我执行以下命令时,我得到了这个:
pol2cart
[X Y]
a1 = [1 2 3 4 5]'; a2 = [6 7 8 9 10]'; pol2cart(a1, a2) ans = 3.2418 -2.9130 -7.9199 -5.8828 2.8366
阅读信息help pol2cart似乎表明我应该得到一个不应该的XY值5x2数组5x1?
help pol2cart
5x2
5x1
您需要像这样调用函数:
[X,Y] = pol2cart(a1, a2);
这将为您提供两个向量:X和Y。
X
Y