>> s = rand(5,7)
s =
0.4186 0.8381 0.5028 0.1934 0.6979 0.4966 0.6602
0.8462 0.0196 0.7095 0.6822 0.3784 0.8998 0.3420
0.5252 0.6813 0.4289 0.3028 0.8600 0.8216 0.2897
0.2026 0.3795 0.3046 0.5417 0.8537 0.6449 0.3412
0.6721 0.8318 0.1897 0.1509 0.5936 0.8180 0.5341
>> [U,S,V] = svd(x)
U =
-0.4898 -0.3969 -0.4590 -0.6260
-0.5360 -0.3441 0.7673 0.0750
-0.5182 0.8415 0.0300 -0.1500
-0.4519 -0.1266 -0.4469 0.7616
S =
4.9686 0 0
0 0.4454 0
0 0 0.1566
0 0 0
V =
-0.8576 0.5123 -0.0451
-0.0320 0.0344 0.9989
0.5133 0.8581 -0.0131
-- 修改不重要的值
>> S(3,3)=0
S =
4.9686 0 0
0 0.4454 0
0 0 0
0 0 0
>> U*S*V‘
ans =
1.9968 0.0718 -1.4009
2.2054 0.0800 -1.4984
2.4002 0.0953 -0.9999
1.8968 0.0699 -1.2009
结论:和原理的值差别不大
>> S(3,3)=0.1566
S =
4.9686 0 0
0 0.4454 0
0 0 0.1566
0 0 0
>> U*S*V‘
ans =
2.0000 0.0000 -1.4000
2.2000 0.2000 -1.5000
2.4000 0.1000 -1.0000
1.9000 0.0000 -1.2000