row of a random size matrix
2 次查看(过去 30 天)
显示 更早的评论
hi,
i wanted to know how to seperate each row of a randomly sized (m,n) matrix
0 个评论
回答(2 个)
Shayan Sepahvand
2021-9-22
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
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!