# How do I find the mean of a binary set for each value of no.1 to7

3 views (last 30 days)

Show older comments

##### 3 Comments

TADA
on 19 Jan 2020

how 'double' generates a 1

What image analyst did there was to generate a logical vector which determines when the value is greater than 4:

b = topRow > 4

b =

0 1 0 0 0 0 0 1 0 1

Next this binary vector was converted to an array of double precision numbers by sending it to the double function

bottomrow = double(b);

Or in a single line of code as image analyst did

### Answers (0)

### See Also

### Community Treasure Hunt

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

Start Hunting!