EDA365电子论坛网
标题:
关于元素扩展问题。
[打印本页]
作者:
panphp
时间:
2020-4-14 15:59
标题:
关于元素扩展问题。
请问如何将矩阵内每个元素扩展,如 A = [a,b,c,d;e,f,g,h]扩展成B = [a(x5个),b(x5个),c(x5个),d(x5个);e(x5个),f(x5个),g(x5个),h(x5个)],用repmat,感谢!
作者:
leleeda
时间:
2020-4-14 17:55
用 repelem比较简单。
3 g# l/ o* n' k
repelem([a b c d;e f g h],1,5)
作者:
Colbie
时间:
2020-4-14 17:56
A = [a,b,c,d;e,f,g,h];
0 A6 E) y- x3 `8 c! E
B = kron(A,ones(1,5))
欢迎光临 EDA365电子论坛网 (https://bbs.eda365.com/)
Powered by Discuz! X3.2