i have an excel file row=10,column=3, I want to show a text message if any of the column is zero

4 ビュー (過去 30 日間)
For example if column 1 is 0 then I want to show 'column one is zero'.

採用された回答

Wayne King
Wayne King 2013 年 12 月 4 日
編集済み: Wayne King 2013 年 12 月 4 日
Will a column either contain all zeros or not? In other words is it possible to have some zeros in a column, but not all zeros?
If a column either contains all zeros or none, you can do
X = ones(10,5);
X(:,3) = 0;
idx = find(~any(X,1));
fprintf('Column %2d is zero.\n',idx)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by