dpb <firstname.lastname@example.org> wrote in message <email@example.com>... > On 10/12/2013 7:45 AM, David Quilligan wrote: > > Hello, > > I have logged timestamps from an ADC which are in unit16 format, i.e. > > the count resets to zero after 65536. How can I easily convert these > > values into continuous values (i.e. does not return to zero after 65536. > > This is easy if the ADC only resets to zero once during my application > > (just add 65336 to each value). However my application does not always > > run for the same length of time and the count resets to zero many many > > times during it. > > If you have Signal Processing Toolbox, > > doc unwrap > > If not, just look for the large negative jumps in succession and then > add 64k from each to the end in succession--when done you've unwrapped > the whole thing... > > Or, of course, you can return the full vector and build a sectional > vector of n*64k and add it all at once. > > --
Could you explain how I would add 64k in succession? I am able to add 64k to my first block. However the second block would require 64k by 2, the 3rd 64k by 3 and so on. And I'm having difficulty finding an easy method to this. Sorry my Matlab experience is very limited.