MATLAB SVD函数

原文地址:MATLAB SVD 函数 作者:小周

>> a=[1 2 3 4;5 6 7 8;9 10 11 12;24 6 7.99999];
[u,s,v]=svds(a)

u =

  0.19309325290913 -0.39372991088164  0.80064042247500  -0.40824829032397
  0.47876392522628  0.03942520140203  0.32025628954945  0.81649658098368
  0.76443459754343  0.47258031368569 -0.16012784453451  -0.40824829049184
  0.38618628362685 -0.78745809913181 -0.48038515432194  -0.00000000008393


s =

 27.55065585030689                                                 0
                  3.31077063809069                                 0
                                  0.00000263117785                 0
                                                   0.00000000000000


v =

  0.37164983947455  0.74958461105215  0.36514742344847  -0.40824829050286
  0.45181723566769  0.30961435841708 -0.18257455406715  0.81649658094722
  0.53198463186084 -0.13035589421799 -0.73029653281457  -0.40824829038587
  0.61215188788081 -0.57032376837933  0.54772334743922  -0.00000000005849

>> [u1,s1,v1]=svds(a,1,0)
Warning: (A-sigma*I) has small reciprocal condition estimate:0.000000
indicating that sigma is near an exact eigenvalue. The
algorithm may not converge unless you try a new value forsigma.

> In eigs at 556
  In svds at 140
Warning: Matrix is singular to working precision.
> In eigs at 700
  In svds at 140
Warning: Matrix is singular to working precision.
> In eigs at 700
  In svds at 140
Warning: Matrix is singular to working precision.
> In eigs at 700
  In svds at 140
Warning: Matrix is singular to working precision.
> In eigs at 700
  In svds at 140
Warning: Matrix is singular to working precision.
> In eigs at 700
  In svds at 140
Warning: Matrix is singular to working precision.
> In eigs at 700
  In svds at 140
Warning: Matrix is singular to working precision.
> In eigs at 700
  In svds at 140
Warning: Matrix is singular to working precision.
> In eigs at 700
  In svds at 140

u1 =

   Empty matrix: 4-by-0


s1 =

    []


v1 =

   Empty matrix: 4-by-0

>> u*s*v'

ans =

  1.00000000000000  2.00000000000000  3.00000000000000  4.00000000000000
  5.00000000000001  6.00000000000001  7.00000000000001  8.00000000000001
  9.00000000000001 10.00000000000001 11.00000000000001  12.00000000000001
  2.00000000000000  4.00000000000000  6.00000000000000  7.99999000000000

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值