Type PARAFAC to get help on the I/O format of the PARAFAC algorithm. To calculate a one-component PARAFAC model type

Factors = PARAFAC(X,DimX,1);

Where X is the data arranged as a matrix, DimX gives the dimensions of the three modes (DimX = [I J K]), and 1 is the number of factors to extract. Remember that in PARAFAC the models are not nested, so if a two-component model is to be estimated one can not use the one-component model as a basis as in ordinary two-way PCA.