Simple way to outline perimeter of grid using indexing.
Show older comments
Given, say, a 4 by 4 grid, is there an easy way to outline various contiguous subsets of the grid?
In other words, if I start out with this

is there an existing function, for example "fillGrid(1:5)", that will produce this

I have not yet found anything in the documentation that appears to be able to do this.
Thanks!
Accepted Answer
More Answers (0)
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!