Changing Values in a column due to another value
1 view (last 30 days)
Show older comments
Patrick Lonergan on 30 May 2021
Answered: Dyuman Joshi on 30 May 2021
I have a collumn which contains 0s and 1s. The value 1 indicates that a failure occurred. I want to change the previous 6 rows prior to the failure to 1s also.
Does anyone have any idea about the best method to do this?
Dyuman Joshi on 30 May 2021
i = find(c==1,1,'first'); %c is the column vector
Find more on Numeric Types 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!