title: Singular Value Decomposition positive value
body: <p>I am using Singular Value Decomposition (SVD) applied to Singular Spectrum Analysis (SSA) of a timeseries.</p>
  
  <pre><code>% original time series
  x1= rand(1,10000);
  N = length(x1);
  
  % windows for trajectory matrix
  L = 600;
  K=N-L+1; 
  
  % trajectory matrix/matrix of lagged vectors
  X = buffer(x1, L, L-1, 'nodelay'); 
  
  % Covariance matrix
  A = X * X' / K;
  
  % SVD
  [U, S_temp, ~] = svd(A);
  
  
  % The eigenvalues of A are the squared eigenvalues of X
  S = sqrt(S_temp);
  d = diag(S);
  % Principal components
  V = X' * U;
  for i = 1 : L
      V(:, i) = V(:, i) / d(i);             
  end
  </code></pre>
  
  <p>I wanted to know if there is a way to have the singular components (i.e. the columns of V) always positive.</p>
  
  <p>X is always > 0 in my case (and also the Covariance matrix A)</p>