Filter löschen
Filter löschen

How can I resize the matrix?

1 Ansicht (letzte 30 Tage)
Rengin
Rengin am 16 Feb. 2015
Beantwortet: Thorsten am 16 Feb. 2015
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

Akzeptierte Antwort

Thorsten
Thorsten am 16 Feb. 2015
B = A(sum(A') ~= 0, :)

Weitere Antworten (0)

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by