SHARE
TWEET

Untitled

a guest Jun 25th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Grid = 10;
  2. M = zeros(Grid);
  3. M(3,1:3)=1;M(2,3)=1;M(1,2)=1;
  4. Black = [0 0 0];
  5. White = [1 1 1];
  6. Red = [1 0 0];
  7. Background = White;
  8. colormap([Background; Red; Black])
  9. figure()
  10. imagesc(M)
  11.      
  12. 0   0   0   0   0   0   0
  13. 0   2   1   0   0   0   0
  14. 1   0   1   0   0   0   0
  15. 0   1   1   0   0   0   0
  16. 0   0   0   0   0   0   0
  17. 0   0   0   0   0   0   0
  18. 0   0   0   0   0   0   0
  19. 0   0   0   0   0   0   0
  20. 0   0   0   0   0   0   0
  21. 0   0   0   0   0   0   0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top