matlab - reconstruct time series from given matrix -


Assume that we are building the following metrics with the given signal

  function [x] = create_matrix1 (b, l) n = length (b); M = N-L + 1; X = zero (m, l); I for = 1: m x (i, :) = b (i: i + l-1); End; For some example window   

for example

  X = [2; 1; 3; 4; 5; 7] X = 2 1 3 4 5 7> & gt; & Gt; B = making_matrix1 (x3) b = 2 1 3 1 3 4 3 4 5 4 5 7 If we have given the length of matrix and windows, then how do I rebuild the original signal Do you? I know that the windows are length 3, thanks in advance, I think I should add elements to the anti diagonal and this anti diagonal should be divided by the number of elements, but how can I do this by code? Thanks in advance   B  and can be rebuilt. Like:  
  & gt; & Gt; X_reconstructed = [B (1,1: end-1). '; B (:, end)] X_reconstructed = 2 1 3 4 5 7   

If the matrix B is some noise matrix and you want to actually average the diagonals With:

  & gt; BB = Flippler (B); & Gt; & Gt; X_mean = arrayfun (@ (i) mean (diag (bb, i)), size (b, 2) -1: -1: -size (b, 1) +1). 'X_mean = 2 1 3 4 5 7    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -