fitting_epsilon
PURPOSE 
sentido = 1 -> Increassing epsilon (i.e. increasing the distortion parameter)
SYNOPSIS 
function [epsilon, l_min, l_max, porcentaje, sentido] = fitting_epsilon(param, param_actual, epsilon, l_min, l_max, porcentaje, sentido)
DESCRIPTION 
CROSS-REFERENCE INFORMATION 
This function calls:
This function is called by:
SOURCE CODE 
0001
0002
0003
0004
0005
0006 function [epsilon, l_min, l_max, porcentaje, sentido] = fitting_epsilon(param, param_actual, epsilon, l_min, l_max, porcentaje, sentido)
0007 if((param - param_actual > 0) & (sentido == 1))
0008
0009 l_min = epsilon;
0010
0011 epsilon = (1 + porcentaje) * epsilon;
0012
0013 if(epsilon > l_max)
0014 epsilon = (l_min + l_max)/2;
0015 end
0016
0017 sentido = 1;
0018
0019 porcentaje = 2 * porcentaje;
0020 return;
0021 end
0022
0023 if((param - param_actual < 0) & (sentido == 1))
0024
0025 porcentaje = porcentaje / 2;
0026
0027 if(porcentaje >= 1)
0028 porcentaje = 0.25;
0029 end
0030
0031 l_max = epsilon;
0032
0033 epsilon = (1 - porcentaje) * epsilon;
0034
0035 if(epsilon < l_min)
0036 epsilon = (l_min + l_max)/2;
0037 end
0038
0039 sentido = 0;
0040 return;
0041 end
0042
0043 if((param - param_actual < 0) & (sentido == 0))
0044
0045 if(porcentaje >= 1)
0046 porcentaje = 0.25;
0047 end
0048
0049 l_max = epsilon;
0050
0051 epsilon = (1 - porcentaje) * epsilon;
0052
0053 if(epsilon < l_min)
0054 epsilon = (l_min + l_max)/2;
0055 end
0056
0057 sentido = 0;
0058
0059 porcentaje = 2 * porcentaje;
0060 return;
0061 end
0062
0063 if((param - param_actual > 0) & (sentido == 0))
0064
0065 porcentaje = porcentaje / 2;
0066
0067 l_min = epsilon;
0068
0069 epsilon = (1 + porcentaje) * epsilon;
0070
0071 if(epsilon > l_max)
0072 epsilon = (l_min + l_max)/2;
0073 end
0074
0075 sentido = 1;
0076 return;
0077 end
Generated on Fri 07-Mar-2014 13:29:20 by m2html © 2005