i have an excel file row=10,column=3, I want to show a text message if any of the column 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개)

카테고리

도움말 센터File Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

질문:

2013년 12월 4일

댓글:

2013년 12월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by