how can I delete some rows from a matrix
11 ビュー (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (1 件)
Star Strider
2024 年 4 月 5 日 11:11
This creates a new matrix with only the odd rows from the original matrix —
A = randi(9, 10,3)
Anew = A(1:2:end,:)
.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!