row of a random size matrix
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
hi,
i wanted to know how to seperate each row of a randomly sized (m,n) matrix
0 comentarios
Respuestas (2)
Shayan Sepahvand
el 22 de Sept. de 2021
Use this code:
[m, n] = size(X);% X is that random matrix
row_mat = zeros(m, 1);
for i = 1:m
row_mat = X(i,:);
end
row_mat is the seperated row
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!