MATLAB Answers

How can I fill everything below the white thing line in this image?

4 views (last 30 days)
Love Matlab
Love Matlab on 17 Jun 2020
Commented: Image Analyst on 18 Jun 2020
In the image I have attached, how can I fill the entire area below the thin white line plotted? Thank you!

  0 Comments

Sign in to comment.

Accepted Answer

Matt J
Matt J on 17 Jun 2020
By adapting the following smaller example,
A =
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 1 1
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
>> B=cummax(A,1)
B =
1 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0
1 1 1 0 0 0 0 0
1 1 1 1 0 0 0 0
1 1 1 1 1 0 0 0
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1

More Answers (0)


Translated by