Hi, I have those lines in my script that they purpuse is to fix jumps in a clock (it runs on a table). for instance this is the data:
1913834560
1993310708
177158681 + 1993310708
270995495 + 1993310708
2036984230 + 1993310708
2057526148 + 1993310708
2064917157 + 1993310708
2089319288 + 1993310708
6799572 +2089319288 + 1993310708
13663870 +2089319288 + 1993310708
in this case the jump is in the bolt line and the correction will be to add the bolt value to all the later values until the next jump (as sown in the bold summing), and so on.
I write this code, but it takes forever to run on ~500K lines, any ideas to improve it?
thanks!
prev = 0; %time linearity
sum = 0;for i = 2:height(T1(:,1)) if prev > T1.time(i) sum = sum + prev; end prev = T1.time(i); T1.time(i) = T1.time(i)+sum;end
Best Answer