Reputation:
let us consider following matrix
a=[1 2 3;2 3 4;3 4 5;4 5 7]
a =
1 2 3
2 3 4
3 4 5
4 5 7
let us consider it's svd
[U E V]=svd(a)
U =
-0.2738 -0.8708 -0.0062 -0.4082
-0.3984 -0.2552 -0.3309 0.8165
-0.5230 0.3605 -0.6557 -0.4082
-0.7020 0.2159 0.6786 0.0000
E =
13.5093 0 0
0 0.6482 0
0 0 0.2797
0 0 0
V =
-0.4032 0.8699 0.2841
-0.5437 0.0220 -0.8390
-0.7361 -0.4928 0.4641
if consider kronecker product of columns of U and V matrix
kron(U(:,1),V(:,1))
ans =
0.1104
0.1489
0.2015
0.1606
0.2166
0.2932
0.2109
0.2843
0.3849
0.2831
0.3817
0.5167
but it is returning as vector form,but i need matrix form,so how can i transform it to matrix insider kron product?maybe i should you reshape command,but could you help me to do it?thanks in advance
Upvotes: 0
Views: 84
Reputation:
i have consider following change as Divakar adviced and it works fine
X=kron(U(:,1),V(:,1)')
X =
0.1104 0.1489 0.2015
0.1606 0.2166 0.2932
0.2109 0.2843 0.3849
0.2831 0.3817 0.5167
thanks my friend for your help
Upvotes: 4