In MATLAB, I need to generate a tensor X of size e.g. 13x10x80 with ranks (4,3,15), i.e., the first, second and third foldings have ranks 4, 3, and 15, respectively.
How can I do this in MATLAB?
As 'kmario23' mentioned you can use Matalb tensor toolbox to do this. I think this is what you are looking for:
X = tenrand([13 10 80]) %<-- Generate data U1 = nvecs(X,1,4); %<-- Mode 1 U2 = nvecs(X,2,3); %<-- Mode 2 U3 = nvecs(X,3,15); %<-- Mode 3 S = ttm(X,{pinv(U1),pinv(U2),pinv(U3)}); %<-- Core Y = ttensor(S,{U1,U2,U3});
As 'kmario23' mentioned you can use Matalb tensor toolbox to do this. I think this is what you are looking for: