how can I find the cell number for the median of a specified range in a large set of data?

1 view (last 30 days)
I have a binary picture and I have used IMPROFILE on a line across the picture, plotting 0's and 1's. then i have a 1000x1 matrix [1 column] of mainly 0's and a three groups of 1's
how can I identify for median or mean cell reference (Ie know which pixel is in the middle of a wide binary line) between 200 and 400 in my 1000x1 matrix.
---- I suppose another way would be to identify the centre of each flat peak in the improfile plot.
Any advice would be most appreciated. Thanks David

Answers (0)

Community Treasure Hunt

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

Start Hunting!