フィルターのクリア

How can I resize the matrix?

1 回表示 (過去 30 日間)
Rengin
Rengin 2015 年 2 月 16 日
回答済み: Thorsten 2015 年 2 月 16 日
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 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