 \sum_{r} \lambda_{r} \; x_{r}^{m}$$
%
% In the example that follows, we form a symmetric Kruskal decomposition by
% specifying a factor matrix, lambda vector, and the number of modes of
% the decomposed tensor. We pass all three arguments to the |symktensor|
% constructor.
% This can be stored as a symmetric Kruskal tensor as follows.
n = 4; %The dimension in each mode of the tensor A
m = 3; %The number of modes of A
r = 2; %The rank of the decomposition
X = reshape(1:n*r,n,r); %The columns of this matrix 