Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Grid = 10;
- M = zeros(Grid);
- M(3,1:3)=1;M(2,3)=1;M(1,2)=1;
- Black = [0 0 0];
- White = [1 1 1];
- Red = [1 0 0];
- Background = White;
- colormap([Background; Red; Black])
- figure()
- imagesc(M)
- 0 0 0 0 0 0 0
- 0 2 1 0 0 0 0
- 1 0 1 0 0 0 0
- 0 1 1 0 0 0 0
- 0 0 0 0 0 0 0
- 0 0 0 0 0 0 0
- 0 0 0 0 0 0 0
- 0 0 0 0 0 0 0
- 0 0 0 0 0 0 0
- 0 0 0 0 0 0 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement