ignal data type will be either in double int16 format
       depending on the flag passed to the function (according to
       the boolean flags below).

 tm
       Nx1 vector of doubles representing the sampling intervals.
       Depending on input flags (see below), this vector can either be a
       vector of integers (sampling number), or a vector of elapsed time
       in seconds  ( with up to millisecond precision only).

 Fs    (Optional)
       1x1 Double, sampling frequency in Hz of the first signa