Advertisement
jgtrosh

matrix

Jul 1st, 2015
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scilab 0.33 KB | None | 0 0
  1. WIDTH = 100;
  2.  
  3. cols = uint8(rand(1, WIDTH)*2);
  4. disp(cols);
  5.  
  6. while %t
  7.     cols(uint8(rand()*WIDTH)+1) = uint8(rand()*2);
  8.     for i=1:WIDTH
  9.         if cols(i) == uint8(1) then
  10.             printf("%c", ascii(32+(126-32)*rand()));
  11.         else
  12.             printf(" ");
  13.         end
  14.     end
  15.     sleep(50);
  16.     printf("\n");
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement