takespecific elements from matrix to build new one

3 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Data Types 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by