takespecific elements from matrix to build new one

1 回表示 (過去 30 日間)
Abdulkareem
Abdulkareem 2014 年 3 月 12 日
編集済み: Chris C 2014 年 3 月 12 日
hey everybody i have 40*10 matrix i want to build new one that contain the first 10 rows (1:10,:) and the third 10 rows (31:40,:) so the new matrix will contain 20*10 . thanks in advance.

採用された回答

Chris C
Chris C 2014 年 3 月 12 日
編集済み: Chris C 2014 年 3 月 12 日
If your original matrix is called A, then
B = [A(1:10,:); A(31:end,:)];

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by