## 二、部分源代码

`%% 通过 Cauchy 近端分裂算法去模糊% y = x + n% y is the 1D noisy signal% x is the clear (noise-free) signal (object of interest)% n is the additive zero-meam Gaussian noise with SNR%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%clearvarsclose allclc%% 参数初始化sizeSignal = 7;M = 2^sizeSignal;N = 2^(sizeSignal + 2);SNRdB = 3;rmse = @(err) sqrt(mean(abs(err(:)).^2));truncate = @(x, M) x(1:M);AH = @(x) fft(x, N)/sqrt(N);A = @(X) truncate(ifft(X), M) * sqrt(N);Niter = 500;[x,y] = wnoise(3, sizeSignal, SNRdB);x = x';y = y';%% 柯西x_hat = AH(zeros(size(y))); % 正则化结果iter = 1;old_X = x_hat;grad_f_x = @(x) AH(A(x) - y); % 梯度算子xx = ones(size(y));yy = 0*ones(size(y));Lip = norm(grad_f_x(xx) - grad_f_x(yy), 2)/norm(xx - yy, 2); % Lipschitz 常数的一般计算。mu = 1.5/Lip;gamma = 2*sqrt(mu)/2;delta_x = inf;tic;while (delta_x(iter) > 1e-3) && (iter < Niter)    iter = iter + 1;    Z = x_hat - mu*(AH(A(x_hat) - y));    x_hat = CauchyProx(real(Z), gamma, mu);    delta_x(iter) = max(abs( x_hat(:) - old_X(:) )) / max(abs(old_X(:))); % 误差计算    old_X = x_hat;end x_Cauchy = A(x_hat);timeSim = toc;RMSE_noisy = rmse(x - y);RMSE_regularized = rmse(x - x_Cauchy);fprintf('Cauchy proximal splitting (CPS) for 1D denoising\nSolved after %d iterations in %.3f seconds\nNoisy RMSE = %.3f\nReconstructed RMSE = %.3f\n', iter, timeSim, RMSE_noisy, RMSE_regularized)figure;set(gcf, 'Position', [100 100 800 300])subplot('Position', [0.0501, 0.1001, 0.9, 0.85])plot(x, 'b', 'Linewidth', 1.5)hold onplot(y, 'k-.', 'Linewidth', 1)plot(x_Cauchy, 'r--', 'Linewidth', 2)grid onlegend('Noise-free', ['Noisy (SNR = ' num2str(SNRdB) ' dB)'], 'CPS')text(40, 0.9*max(y), ['RMSE_{Noisy} = ' num2str(RMSE_noisy)], 'Color', 'Black')text(40, 0.6*max(y), ['RMSE_{CPS} = ' num2str(RMSE_regularized)], 'Color', 'Red')`

## 四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1] 沈再阳.精通MATLAB信号处理[M].清华大学出版社，2015.
[2]高宝建,彭进业,王琳,潘建寿.信号与系统——使用MATLAB分析与实现[M].清华大学出版社，2020.
[3]王文光,魏少明,任欣.信号处理与系统分析的MATLAB实现[M].电子工业出版社，2018.