Assigning Null / Multi-Dimensional Matrix
Afficher commentaires plus anciens
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 commentaires
KSSV
le 7 Avr 2022
Question is not clear. What you want to do in the loop?
tinkyminky93
le 7 Avr 2022
Réponse acceptée
Plus de réponses (1)
A = repmat(1:5,4,1)
A(:,1:3) = []
1 commentaire
tinkyminky93
le 7 Avr 2022
Modifié(e) : tinkyminky93
le 7 Avr 2022
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!