intitn',10);

%% Control sign ambiguity of factor matrices
% The default behavior of |cp_als| is to make a call to |fixsigns| to fix
% the sign ambiguity of the factor matrices. You can turn off this behavior
% by passing the |'fixsigns'| parameter value of |false| when calling |cp_als|.
X = ktensor([1;1], {[1, 1; 1, -10],[1, 1; 1, -10]});
M = cp_als(X, 2, 'printitn', 0, 'init', X.U) % <-default behavior, fixsigns called
M = cp_als(X, 2, 'printitn', 0, 'init', X.U, 'fixsigns', false) % <-fixsigns not called