How to make a matrix has more pixels?
Show older comments
Hi,
Apparently when I use the following code I am creating a matrix with 15x15 pixels.
dmin1=2;
n=15;
manhattan=ones(n,n,3);
manhattan(2:dmin1:end,2:dmin1:end,:)=0;
imwrite(manhattan,'matrix_15x15.png');
How can I make it bigger, in order to see the black points (the 0's) bigger?
To make something like:
Supose that the 0's are 32 pixel...
Then I do something like 32 pixel are 20 meters...
So, I need the 0's be bigger than 1 pixel.
Any suggestion?
8 Comments
KSSV
on 18 Aug 2020
Increase n.
Oliver Lestrange
on 18 Aug 2020
Edited: Oliver Lestrange
on 18 Aug 2020
Walter Roberson
on 18 Aug 2020
checkerboard() https://www.mathworks.com/help/images/ref/checkerboard.html
Oliver Lestrange
on 18 Aug 2020
Oliver Lestrange
on 18 Aug 2020
Walter Roberson
on 18 Aug 2020
At the command line command
type checkerboard
and study how they do it.
Oliver Lestrange
on 18 Aug 2020
Walter Roberson
on 18 Aug 2020
I am suggesting that checkerboard() is a function that creates a regular repeated pattern, and that studying how it is coded would give you ideas on how to form the regular repeated pattern that you want.
Accepted Answer
More Answers (0)
Categories
Find more on Data Exploration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

