How to Create/Modify for matrices or matrix
28 次查看(过去 30 天)
显示 更早的评论
K=5
matA= [1 2 ..4 K]
matB=[matA matA matA matA matA]
matB=[1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5]
How to operate this equation matB?
0 个评论
采纳的回答
Arif Hoq
2022-4-12
try this:
K=5
matA=1:K;
% matB=[matA matA matA matA matA]
% matB=[1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5]
matB=repmat(matA,size(matA,1),numel(matA))
0 个评论
更多回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!