How can I resize the matrix?

1 次查看(过去 30 天)
Hello, Let's say I have the matrix as below:
A= [0 0 0 0 0;0 0 0 0 0;2 3 9 1 7;4 5 6 5 4;0 0 0 0 0] (It can be in different size too)
I want have:
B=[2 3 9 1 7; 4 5 6 5 4] out of A
How can I do that? Thx

采纳的回答

Thorsten
Thorsten 2015-2-16
B = A(sum(A') ~= 0, :)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by