max_incr_pend_Lcurva

PURPOSE ^

This function determines the maximum angular slope variation in the

SYNOPSIS ^

function regu=max_incr_pend_Lcurva(x,y,lambdas)

DESCRIPTION ^

 This function determines the maximum angular slope variation in the
 L-curve

 lambda=max_incr_pend_Lcurva(r,Lx,lambdas)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % This function determines the maximum angular slope variation in the
0002 % L-curve
0003 %
0004 % lambda=max_incr_pend_Lcurva(r,Lx,lambdas)
0005 function regu=max_incr_pend_Lcurva(x,y,lambdas)
0006 
0007 if (size(x,1)<size(x,2))
0008    x=x';
0009    y=y';
0010 end
0011 
0012 xx=linspace(min(x),max(x),25000);
0013 
0014 h= xx(2)-xx(1);
0015 
0016 try
0017 yy = interp1(x,y,xx,'cubic');
0018 
0019 pendientes = diff(yy)/h;
0020 
0021 angulos = atan(pendientes)*180/pi;
0022 
0023 angulos = (angulos<=-(85))*(-85) + (angulos>=(-10))*(-10) + angulos.*(angulos>(-85) & angulos<(-10));
0024 
0025 a=diff(angulos);
0026 
0027 mc=find(a==max(max(a)));
0028 
0029 regu = interp1(x,lambdas',xx(mc),'cubic');
0030 
0031 catch
0032 regu = 2;
0033 end

Generated on Fri 07-Mar-2014 13:28:33 by m2html © 2005