Change element of a matrix in a row
1 view (last 30 days)
Show older comments
Hello community,
I am using matlab for image processing. I filter the image and get a black-white image and after that i want to count them. I finished that. The problem is that in the Matrix there are white places. For better understanding i gave you an example.
A
0 0 0 0 0
1 0 1 0 0
0 1 0 0 1
1 1 1 1 0
1 0 0 0 1
the result should be
A
0 0 0 0 0
1 1 1 0 0
0 1 1 1 1
1 1 1 1 0
1 1 1 1 1
I can't code it so please i need your help. I hope you can help me.
Thanks!
2 Comments
Jan
on 3 Nov 2016
Please explain the procedure: Do you want to the rows to be filled by 1s between the first and the lase 1?
Answers (2)
See Also
Categories
Find more on Image Processing Toolbox 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!