資源簡介
L曲線法是確定正則化問題正則化參數的有效方法,通過matlab程序可方便的采用L曲線法計算正則化參數

代碼片段和文件信息
function?plot_lc(rhoetamarkerpsreg_param)?
%PLOT_LC?Plot?the?L-curve.?
%?
%?plot_lc(rhoetamarkerpsreg_param)?
%?
%?Plots?the?L-shaped?curve?of?the?solution?norm?
%????eta?=?||?x?||??????if???ps?=?1?
%????eta?=?||?L?x?||????if???ps?=?2?
%?as?a?function?of?the?residual?norm?rho?=?||?A?x?-?b?||.??If?ps?is?
%?not?specified?the?value?ps?=?1?is?assumed.?
%?
%?The?text?string?marker?is?used?as?marker.??If?marker?is?not?
%?specified?the?marker?‘-‘?is?used.?
%?
%?If?a?fifth?argument?reg_param?is?present?holding?the?regularization?
%?parameters?corresponding?to?rho?and?eta?then?some?points?on?the?
%?L-curve?are?identified?by?their?corresponding?parameter.?
?
%?Per?Christian?Hansen?IMM?12/29/97.?
?
%?Set?defaults.?
if?(nargin==2)?marker?=?‘-‘;?end??%?Default?marker.?
if?(nargin?4)?ps?=?1;?end???????%?Std.?form?is?default.?
np?=?10;???????????????????????????%?Number?of?identified?points.?
?
%?Initialization.?
if?(ps?1?|?ps?>?2)?error(‘Illegal?value?of?ps‘)?end?
n?=?length(rho);?ni?=?round(n/np);?
?
%?Make?plot.?
loglog(rho(2:end-1)eta(2:end-1))?ax?=?axis;?
if?(max(eta)/min(eta)?>?10?|?max(rho)/min(rho)?>?10)?
??if?(nargin?5)?
????loglog(rhoetamarker)?axis(ax)?
??else?
????loglog(rhoetamarkerrho(ni:ni:n)eta(ni:ni:n)‘x‘)?axis(ax)?
????HoldState?=?ishold;?hold?on;?
????for?k?=?ni:ni:n?
??????text(rho(k)eta(k)num2str(reg_param(k)));?
????end?
????if?(~HoldState)?hold?off;?end?
??end?
else?
??if?(nargin?5)?
????plot(rhoetamarker)?axis(ax)?
??else?
????plot(rhoetamarkerrho(ni:ni:n)eta(ni:ni:n)‘x‘)?axis(ax)?
????HoldState?=?ishold;?hold?on;?
????for?k?=?ni:ni:n?
??????text(rho(k)eta(k)num2str(reg_param(k)));?
????end?
????if?(~HoldState)?hold?off;?end?
??end?
end?
xlabel(‘residual?norm?||?A?x?-?b?||_2‘)?
if?(ps==1)?
??ylabel(‘solution?norm?||?x?||_2‘)?
else?
??ylabel(‘solution?semi-norm?||?L?x?||_2‘)?
end?
title(‘L-curve‘)?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2009-10-15?21:37??L曲線程序\
?????文件????????1158??2003-12-16?21:08??L曲線程序\CGSVD.M
?????文件?????????794??2003-12-16?21:08??L曲線程序\CSVD.M
?????文件???????17767??2008-12-15?17:59??L曲線程序\data3.dat
?????文件????????1271??2003-12-16?21:08??L曲線程序\LCFUN.M
?????文件????????7585??2003-12-16?21:08??L曲線程序\L_CORNER.M
?????文件????????5495??2003-12-16?21:08??L曲線程序\L_CURVE.M
?????文件????????1890??2001-09-13?09:07??L曲線程序\plot_lc.m
- 上一篇:matlab中step的用法
- 下一篇:基于matlab的RS編解碼仿真程序
評論
共有 條評論