您现在的位置:首页 >> ★免费资源 >> 源码下载 >> 内容

MATLAB代做-Tikhonov

时间:2018-12-13 13:49:25 点击:

  核心提示:Tikhonov ...
% Example computations related to two-dimensional deconvolution.
% Here we apply Tikhonov regularization and the L-curve method
%
% Samuli Siltanen September 2007

% Construct example signal (two-dimensional)
N = 16;
x = zeros(N,N);
x(round(N/4):round(N/2),round(N/4):round(N/2)) = 1;

% Take a look at the signal
figure(1)
clf
imagesc(x)
colormap gray
title('Signal x')
axis square

% Construction of the measurement matrix A
A = oblur(N,3);

% Compute SVD
[U,D,V]   = svd(full(A));
svals     = diag(D);
[row,col] = size(D.');

% Construct ideal and noisy measurements m and mn
m          = A*x(:);
m          = reshape(m,N,N);
noiselevel = .2;
mn         = m + noiselevel*randn(size(m));

% Take a look at the noisy measurement
figure(1)
clf
subplot(1,2,1)
imagesc(x)
colormap gray
title('Signal x')
axis square
axis off
subplot(1,2,2)
imagesc(mn)
colormap gray
title('Measurement')
axis square
axis off

% Vector of regularization parameters
deltavec = 10.^linspace(-7,3,43);

% Loop over regularization parameters and record corresponding norms
Lx_norms   = zeros(size(deltavec));
Ax_m_norms = zeros(size(deltavec));
for iii=1:length(deltavec)
    delta = deltavec(iii);
    % Reconstruct from noisy data using Tikhonov regularization and delta as
    % regularization parameter
    Dplusdelta = diag(svals./(svals.^2+delta));
    recn       = V*Dplusdelta*U.'*mn(:);
    recn       = reshape(recn,N,N);
    
    % Compute norms of the two competing terms in the regularization problem
    Lx_norms(iii)   = norm(recn(:));
    Ax_m_norms(iii) = norm(A*recn(:)-mn(:));
    
    % Take a look at the reconstruction
    figure(3)
    clf
    subplot(1,2,1)
    imagesc(x)
    colormap gray
    title('Signal x')
    axis square
    axis off
    subplot(1,2,2)
    imagesc(recn)
    colormap gray
    title(['Tikhonov regularization with \delta=', num2str(delta)])
    axis square
    axis off
    pause
end
    
% Plot the L-curve
figure(3)
clf
plot(log(Ax_m_norms),log(Lx_norms))
title('L-curve analysis','fontsize',16)
xlabel('log ||Ax-m||','fontsize',16)
ylabel('log ||Lx||','fontsize',16)
pause
hold on
% Choose the index of deltavec giving the delta value at the corner of the
% L-curve. Here we do this just visually, not automatically.
best_index = 20;
plot(log(Ax_m_norms(best_index)),log(Lx_norms(best_index)),'r*')
pause

% Compute "Best" reconstruction
delta      = deltavec(best_index);
Dplusdelta = diag(svals./(svals.^2+delta));
recn       = V*Dplusdelta*U.'*mn(:);
recn       = reshape(recn,N,N);
figure(4)
clf
subplot(1,2,1)
imagesc(x)
colormap gray
title('Signal x')
axis square
axis off
subplot(1,2,2)
imagesc(recn)
colormap gray
title(['Tikhonov regularization with \delta=', num2str(delta)])
axis square
axis off

联系:highspeedlogic

QQ :1224848052

微信:HuangL1121

邮箱:1224848052@qq.com

网站:http://www.mat7lab.com/

网站:http://www.hslogic.com/

微信扫一扫:

Tags:TIKHONOV 
作者:Tikhonov 来源:Tikhonov
  • 您是如何找到本站的?
  • 百度搜索
  • Google搜索
  • 查阅资料过程中
  • 论坛发现
  • 百度贴吧发现
  • 朋友介绍
本站最新成功开发工程项目案例
相关评论
发表我的评论
  • 大名:
  • 内容:
  • matlab代做|matlab专业代做|matlab淘宝代做|matlab代写(www.hslogic.com) © 2019 版权所有 All Rights Reserved.
  • Email:highspeed_logic@163.com 站长QQ: 1224848052

    专业代做/代写/承接、MATLAB、SIMULINK、FPGA项目、博士/硕士/本科毕业设计、课题设计、论文,毕业论文,Coursework、Eassy、Assignment