how to count the number of outputs obtained in command window
조회 수: 1 (최근 30일)
이전 댓글 표시
When i perform a 'if' loop operation, 7 outputs are generated.. the outputs are 2,5,34.. etc., how to find the number of outputs generated.
댓글 수: 4
Walter Roberson
2012년 9월 10일
Sivakumaran, please add meaningful tags to this question to make it easier to categorize. See http://www.mathworks.co.uk/matlabcentral/answers/43073-a-guide-to-tags
답변 (1개)
Azzi Abdelmalek
2012년 9월 10일
편집: Azzi Abdelmalek
2012년 9월 10일
t=xlsread('table.xlsx');
w=t(:,2:5);
v=w(:,2:4);
Output_Number=0
for i=1:14
numerator = ismember(v,v(i,:),'rows');
if (sum(numerator)==1)
t(:,6)=0;
Output_Number=Output_Number+1
end
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!