From: dpb on 28 Oct 2009 16:27 HengTong DING wrote: .... > Both W and K's conditioning number are much larger than 1, and K is > more ill-conditioned than W, but how come K is better decomposed ? > Another thing about this symmetric matrix W is its entries are very > big(order of 10^10) ... It's the _structure_ that's critical which is what was trying to indicate previously; see Bruno's examples that demonstrate that magnitude alone isn't the key. --
From: HengTong DING on 28 Oct 2009 16:55 dpb <none(a)non.net> wrote in message <hca9ol$d7e$1(a)news.eternal-september.org>... > It's the _structure_ that's critical which is what was trying to > indicate previously; see Bruno's examples that demonstrate that > magnitude alone isn't the key. > Maybe I got your point and I tried >> WW =W./10^30 ; >> cond(WW) ans = 2.052655156160655e+13 >> [Uww,sww,Vww]=svd(WW) ; >> norm(Uww*sww*Vww' - WW) ans = 9.055065906076394e-24 >> norm((Uww*sww*Vww')*10^30 - W) ans = 9.213492550145945e+06 and why this ? The output of norm((Uww*sww*Vww')*10^30 - W) should be 9.055065906076394e(-24+30)=9.055065906076394e+06 but not 9.213492550145945e+06 ! How should one tell the precision of decomposition ? I'm more confused...
From: dpb on 28 Oct 2009 17:25 HengTong DING wrote: > dpb <none(a)non.net> wrote in message <hca9ol$d7e$1(a)news.eternal-september.org>... > >> It's the _structure_ that's critical which is what was trying to >> indicate previously; see Bruno's examples that demonstrate that >> magnitude alone isn't the key. >> > Maybe I got your point and I tried > >>> WW =W./10^30 ; .... I don't think you did. It isn't the absolute _magnitude_ per se, it's the internal structure (think singular or nearly so, for one simple example). Bruno's example change the scale (as you did above) but it doesn't affect the internal structure of the matrix. You might try balancing; whether it's appropriate depends on the matrix and the problem but you could at least start by reading the ML discussion under SVD and balance() although you may need more serious research/reading to get to the bottom of this than for which c.s-s.m is an appropriate forum. --
From: HengTong DING on 29 Oct 2009 09:10 dpb <none(a)non.net> wrote in message <hcad5j$dch$1(a)news.eternal-september.org>... > You might try balancing; whether it's appropriate depends on the matrix > and the problem but you could at least start by reading the ML > discussion under SVD and balance() although you may need more serious > research/reading to get to the bottom of this than for which c.s-s.m is > an appropriate forum. Thanks for your information. As the matrix W here is a symmetric matrix, balance() does not help. In my specific problem the ratio of the largest diagonal entry to the smallest one is the order of 10^12, which may explain the ill-conditioned singular values. BUT here I do not do the inversion of W and just do SVD, so it does not matter whether W is ill-conditioned or not. >> size(W) ans = 31 31 >> rank(W) ans = 31 >> max(diag(W)) ans = 3.553227816327542e+21 >> min(diag(W)) ans = 1.816281500810983e+09 The problem is if one wants to test the SVD, one should of course do 1> Test wether U*U' = V*V' = 1 2> Test wether W = U*S*V' >> norm(U*U') ans = 1.000000000000002e+00 >> norm(V*V') ans = 1.000000000000001e+00 >> WW=U*S*V'; WW(1,1) ans = 1.816281500793592e+09 >> W(1,1) ans = 1.816281500810983e+09 Take the first entry of W for example, they differ a lot! As Bruno said, the norm itself alone is meaningless, but how could we test SVD ??? Another thing I haven't figured out is: >> norm(W - W') ans = 0 >> norm(K'*W*K - (K'*W*K)') ans = 1.828107974111172e+02 >> max(max(abs(K'*W*K - (K'*W*K)'))) ans = 1.827500000000000e+02 since W is a symmetric matrix, K'*W*K should also be a symmetric matrix, but how come in the output of matlab there are still some entries are quite different ,e.g. max(max(abs(K'*W*K - (K'*W*K)'))) = 1.827500000000000e+02. So all in all, my questions come into the precision of matlab itself, as matlab does the manipulation automatically in double precision. But why the numbers differ a lot even for the calculation of norm(K'*W*K - (K'*W*K)') ???
From: Bruno Luong on 29 Oct 2009 09:26 "HengTong DING" <hengtong.ding(a)physik.uni-bielefeld.de> wrote in message <hcc47s$t0c$1(a)fred.mathworks.com>... > > >> max(max(abs(K'*W*K - (K'*W*K)'))) > > ans = > > 1.827500000000000e+02 > > since W is a symmetric matrix, K'*W*K should also be a symmetric matrix, but how come in the output of matlab there are still some entries are quite different ,e.g. max(max(abs(K'*W*K - (K'*W*K)'))) = 1.827500000000000e+02. > Sight... the value 1.827500000000000e+02 alone is *meaningless* to judge the accuracy. 183 of what unit? If it's 183 unit-weight of an electron it's negligible compared to the weight of an elephant. Bruno
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: Regarding SPL Spectra using Matlab Next: MATLAB Out-of-core Solution |