row of a random size matrix
조회 수: 3 (최근 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!