I have this problem I can't seem to figure out.
There are two vectors:
Failures : which includes all the times at which a failure has occurred (42x1)
Detoriation: which is a 4380x2 vector, the first column consisting of hours from 1 till 4380. The second column being the percentage of detoriation at that time.
Combining the hours of the failures with the detoriation vectors allows to find the percentage of detoriation at time of the failure.
However, in some data set the time of the failure is set incorrectly resulting in a level of detoriation of 0 (just after the failure), so I want to change the time of the failure to -1 (the value before it) to take the actual level of detoriation at time of the failure. I have been trying the code below, but can't get it to work.
Any ideas on how to fix this?