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!