how can I delete some rows from a matrix
이전 댓글 표시
Hello,
I have a matrix with 3 col and many rows, I need to to create a new matrix with only odd romws numbers and delet the pair rows.
Someone have an idea how I can do this?
Thank you very much
답변 (1개)
This creates a new matrix with only the odd rows from the original matrix —
A = randi(9, 10,3)
Anew = A(1:2:end,:)
.
카테고리
도움말 센터 및 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!