hi, i use code contain the following code . i need the output for the following code dont display in output ?

for i=1:mm
temp1=A(i,:,:);
whos temp1
temp2 = nonzeros(temp1);
whos temp2
temp3 = unique(temp2);
whos temp3
temp4=sum(temp3);
whos temp4
temp5 = length(temp3);
whos temp5
b(i)=temp4/temp5;
end

4 Comments

Are you saying that the output from whos does not appear in the Command Window? How are you calling this code? Please provide more information about the code that contains this excerpt.
when use above code then display in Command Window as
Name Size Bytes Class Attributes
temp1 13x1x40 4160 double
Name Size Bytes Class Attributes
temp2 40x1 320 double
Name Size Bytes Class Attributes
temp3 12x1 96 double
Name Size Bytes Class Attributes
temp4 1x1 8 double
Name Size Bytes Class Attributes
temp5 1x1 8 double
....This benefit me but i need dont display this in command window
I want this screen does not appear absolutely, because it takes a large space in command window . As was used ; after the variable because prevent him from appearing. Is there a way to prevent the latest screen from appearing on command window

Sign in to comment.

 Accepted Answer

As you see there is whos used in the code...(whos temp1 etc.,). whos lists in alphabetical order the names, sizes, and types of all variables in the currently active workspace. So to avoid that listitng you comment (%) the lines starting with whos.

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!