% Input:
% results: Matrix
% L: matrix (containing row-wise direction vectors)
% bq: vector (constants from continuous dynamics equations)

% Output:
% results: Matrix
% L: Matrix (containing row-wise direction vectors)

% Description:
% If an additional dimension is introduced to the system, the evaluation is
% resetted to 1 to avoid additional numerical inaccuracies)

% Beschreibung:
% Falls eine zusätzliche Dimension im System enthalten ist, so wird deren
% Auswertung auf 1 zurückgesetzt (Änderungen sind nur auf numerische
% Ungenauigkeiten zurückzuführen)

function [results,L] = redefineDimensions(results,L,bq)

% renew additional dimensions
if ~isempty(bq)
 
    directions = zeros(size(L,2)-1,1);
    for i=1:1:size(L,2)-1
        directions(i,1) = i;
    end;
    
    [Lconstraint,resultsconstraint, ~] = selectDirectionsInSpace(L,results,directions);
    add_dim = zeros(2,size(Lconstraint,2));
    add_dim(1,size(Lconstraint,2)) = 1;
    add_dim(2,size(Lconstraint,2)) = -1;
    L = [Lconstraint; add_dim];
    results = [resultsconstraint; 1;-1];
end;
   
    
    
    