Assigning Null / Multi-Dimensional Matrix
Mostrar comentarios más antiguos
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 comentarios
KSSV
el 7 de Abr. de 2022
Question is not clear. What you want to do in the loop?
tinkyminky93
el 7 de Abr. de 2022
Respuesta aceptada
Más respuestas (1)
A = repmat(1:5,4,1)
A(:,1:3) = []
1 comentario
tinkyminky93
el 7 de Abr. de 2022
Editada: tinkyminky93
el 7 de Abr. de 2022
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!