Code covered by the BSD License  

Highlights from
Align two time-stamped data streams in time

5.0

5.0 | 1 rating Rate this file 10 Downloads (last 30 days) File Size: 1.78 KB File ID: #40468
image thumbnail

Align two time-stamped data streams in time

by

 

Align two time-stamped data streams in time

| Watch this File

File Information
Description

TIMEALIGN Align 2 data matrices in time.
    The presumption is that t1 and t2 vectors are associated with data matrices that must be time aligned. There is no assumption of even time spacing, but times are assumed to be monotonically increasing.
 
    Matrices u1 and u2 must be column-based, i.e., length(t1) == size(u1,1) and length(t2) == size(u2,1)
 
    [t,a1,a2] = timealign(t1,t2,u1,u2) returns
      t time, the union of t1 & t2
      a1 u1 at points where t == t1 (NaN otherwise)
      a2 u2 at points where t == t2 (NaN otherwise)
 
    [...] = timealign(t1,t2,u1,u2,res) aligns using a fixed resolution res
 
 
    EXAMPLE:
      t1 = [1 2 3]'; u1 = [6 7 8]';
      t2 = [2 4 5]'; u2 = [3 4; -1 2; 9 12];
      [t,a1,a2] = timealign(t1,t2,u1,u2)
       t = a1 = a2 =
           1 6 NaN NaN
           2 7 3 4
           3 8 NaN NaN
           4 NaN -1 2
           5 NaN 9 12

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
07 Mar 2013 Per  

Contact us