How can I unfold a tensor?

3 views (last 30 days)
zhang ting
zhang ting on 27 Aug 2013
Edited: Rachel on 2 Aug 2016
In the algorithm of High order SVD, A is a tensor, how to unfold it? for examplr,A(1),A(2),A(3). Thank you so much .

Answers (2)

Rachel
Rachel on 2 Aug 2016
Edited: Rachel on 2 Aug 2016
function [X] = Unfold( T, dim, i )
X = reshape(shiftdim(T,i-1), dim(i), []);

the cyclist
the cyclist on 27 Aug 2013
Edited: the cyclist on 27 Aug 2013
I am not sure I understand, but I think you want to do
A(:)
or use the reshape() command.

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!