Generate a sector mask within a big matrix
Show older comments
A sector mask is defined by distance and angle. Please see the image for clarification on mask.
I want to generate a 100 by 100 matrix where all the matrix element inside the mask is 1 otherwise 0.

Thanks.
2 Comments
Looky
on 11 Dec 2019
Do you already have the coordinates as show in the image? Then just convert to polar using cart2pol and afterwards use some simple logic to check for radius and the angle.
Turlough Hughes
on 11 Dec 2019
Can you attach the matrix as a .mat
Accepted Answer
More Answers (0)
Categories
Find more on Interpolation of 2-D Selections in 3-D Grids 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!