for i=1:1000 x(i) = randi(10);end y = zeros(1,10); for i=1:1000 y(x(i)) = y(x(i)) + 1;end y
Standard input is empty
y = 94 109 101 109 96 99 93 115 105 79
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!