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 中使用 repmat 的技巧。我尝试了多种组合,但无法达到我的需要。
我有一个大小为 1 x 20 的向量 A。我只想堆叠 A 以创建 3 x 5 x 20 大小的矩阵。你能帮忙吗?
A = 1:20; reshape(repmat(A, [15, 1]), [3,5,20])