Assigning Null / Multi-Dimensional Matrix
Ältere Kommentare anzeigen
Hello,
I have a matrix with the dimensions of 4x2500 and I am generating this matrix in for loop. I want this matrix to be 4x1250. Without multi dimension I just write A(1:length(X)) = [] but I am stuck in multi dimension. This logic does not work in my operation.
when I say
A = [1:1:2500];
A (1:1250) = [];
it works and that is what i want to do.
but in multi dimension,
for i = 1:1:4
A(i,:) = ????????
end
Can someone help me? Thanks.
2 Kommentare
KSSV
am 7 Apr. 2022
Question is not clear. What you want to do in the loop?
tinkyminky93
am 7 Apr. 2022
Akzeptierte Antwort
Weitere Antworten (1)
A = repmat(1:5,4,1)
A(:,1:3) = []
1 Kommentar
tinkyminky93
am 7 Apr. 2022
Bearbeitet: tinkyminky93
am 7 Apr. 2022
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!