How to Create/Modify for matrices or matrix
32 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mirza Etnisa
am 12 Apr. 2022
Bearbeitet: Les Beckham
am 12 Apr. 2022
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 Kommentare
Akzeptierte Antwort
Arif Hoq
am 12 Apr. 2022
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 Kommentare
Weitere Antworten (1)
Les Beckham
am 12 Apr. 2022
Bearbeitet: Les Beckham
am 12 Apr. 2022
K=5;
matA = 1:K
matB = repmat(matA, 1, K)
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!