Code covered by the BSD License  

Highlights from
NLCSmoothReg

image thumbnail
from NLCSmoothReg by Michael Wendlandt
Computes a smooth regularized solution of an ill-posed discrete linear inverse problem.

getposLP.m
pt=get(gca,'Currentpoint');
xdat_pt=pt(1,1);
h=findobj(gcf,'Type','line');

xdat=get(h(1),'XData');
ydat0=get(h(3),'YData');
ydat=get(h(1),'YData');

ydat_pt=interp1(xdat,ydat,xdat_pt);
ydat0_pt=interp1(xdat,ydat0,xdat_pt);

cla
loglog(xdat,ydat0);hold on;loglog(xdat_pt,ydat0_pt,'x');hold on;loglog(xdat,ydat,'LineStyle','none');
set(gca,'XLim',[(0.99*min(xdat)) max(xdat)]);
xlabel('||S - K*g||'),ylabel('R[g]^0.5');title(['L-curve, \lambda = ',num2str(ydat_pt)])

Contact us at files@mathworks.com