jingweimo的个人博客分享 http://blog.sciencenet.cn/u/jingweimo

博文

Solving an ill-posed problem by Singular Value Decomposition

已有 2416 次阅读 2016-2-10 03:03 |系统分类:科研笔记

%Given a ill-posed problem: Af=g where A has a very large condition number

%a) singular values

sigma=svd(A);

figure;

plot(sigma,'b-','linewidth',1.5);

title('Singular values');

%b) condition number

k=cond(A,2);

disp('The condition number of A is:');

disp(k);


%c) pseudosolution

%fs=sum(Vk*Uk'*g/sigma)

[u,s,v]=svd(A);

sigma=diag(s);

fs=zeros(size(g));

for ii=1:rank(s);

   temp=(1/sigma(ii))*v(:,ii)*u(:,ii)'*g;

   fs=fs+temp;

end

figure;

plot(fs,'b-','linewidth',1.5);

title('Pseudosolution');

%Alternatively

%r=rank(A);

%sinv=diag(1./sigma);

%fs=v(:,1:r)*sinv(1:r,1:r)*u(:,1:r)'*g;


% discrepancy

%epsillon=sqrt(Af-g);

eps=abs(A*fs-g);

figure;

plot(eps,'b-','linewidth',1.5);

title('Discrepancy');


% energy E

E=fs.^2;

figure;


plot(E,'b-','linewidth',1.5);

title('Energy');


%Note the problem can also be solved by QR factorization or householder reflectors. But SVD is more preferable inasmuch it is robust to noise, able to hand rank-deficiency and efficient in computation as well.






https://blog.sciencenet.cn/blog-578676-955333.html

上一篇:我是青年
下一篇:Signal-to-noise ratio and noise addition
收藏 IP: 35.10.57.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-12-5 04:12

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部