i have an excel file row=10,column=3, I want to show a text message if any of the column is zero
1 次查看(过去 30 天)
显示 更早的评论
For example if column 1 is 0 then I want to show 'column one is zero'.
0 个评论
采纳的回答
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 Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!