binary mask

3 views (last 30 days)
nomad nomad
nomad nomad on 30 Apr 2011
Answered: Voss on 27 Dec 2021
Good evening,
To obtain an optimal discrimination capability between two peaks from a correlation operation between a stage and a target, I apply a bit mask that blocks certain frequencies,
I wonder because I have no idea, how to mask and on what basis?
Thank you in advance
  1 Comment
Walter Roberson
Walter Roberson on 30 Apr 2011
Please clarify the difference between this question and your earlier one, http://www.mathworks.com/matlabcentral/answers/6479-classification-of-a-matrix-and-binary-mask

Sign in to comment.

Answers (1)

Voss
Voss on 27 Dec 2021
A = magic(5)
A = 5×5
17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 21 3 11 18 25 2 9
mask = logical(1-eye(5))
mask = 5×5 logical array
0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0
A(~mask) = NaN
A = 5×5
NaN 24 1 8 15 23 NaN 7 14 16 4 6 NaN 20 22 10 12 19 NaN 3 11 18 25 2 NaN

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!