how to count the number of outputs obtained in command window

5 views (last 30 days)
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 Comments
Sivakumaran Chandrasekaran
t=xlsread('table.xlsx');
w=t(:,2:5);
v=w(:,2:4);
for i=1:14
numerator = ismember(v,v(i,:),'rows');
if (sum(numerator)==1)
t(:,6)=0;
i
end
end

Sign in to comment.

Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 10 Sep 2012
Edited: Azzi Abdelmalek on 10 Sep 2012
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

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Tags

No tags entered yet.

Products

Community Treasure Hunt

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

Start Hunting!