Changeset 5383
- Timestamp:
- 08/18/10 15:26:45 (15 years ago)
- Location:
- issm/trunk/src/m/classes/public/parameterization
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/public/parameterization/parametercontrolB.m
r5359 r5383 4 4 % It is possible to specify the number of steps, values for the 5 5 % minimum and maximum values of B, specify a noise dampening, the 6 % kind of fitto use or the the optscal.6 % kind of cm_responses to use or the the optscal. 7 7 % 8 8 % Usage: … … 11 11 % Example: 12 12 % md=parametercontrolB(md) 13 % md=parametercontrolB(md,'nsteps',20,'cm_noisedmp',10^-15,' fit',0)13 % md=parametercontrolB(md,'nsteps',20,'cm_noisedmp',10^-15,'cm_responses',0) 14 14 % md=parametercontrolB(md,'cm_min',10,'cm_max',10^8,'cm_jump',0.99,'maxiter',20) 15 15 % md=parametercontrolB(md,'cm_maxdmp_value',5*10^8,'cm_maxdmp_slope',10^-20,,'cm_mindmp_value',10^7,'cm_mindmp_slope',10^-17) … … 118 118 end 119 119 120 % fit120 %cm_responses 121 121 found=0; 122 if exist(options,' fit'),123 fit=getfieldvalue(options,'fit');124 if ~any( fit~=0 & fit~=1 & fit~=2),125 md. fit=repmat(fit(:),md.nsteps,1);126 md. fit(md.nsteps+1:end)=[];122 if exist(options,'cm_responses'), 123 cm_responses=getfieldvalue(options,'cm_responses'); 124 if ~any(~ismember(cm_responses,[ SurfaceAbsVelMisfitEnum, SurfaceRelVelMisfitEnum, SurfaceLogVelMisfitEnum, SurfaceLogVxVyMisfitEnum, SurfaceAverageVelMisfitEnum ])); 125 md.cm_responses=repmat(cm_responses(:),md.nsteps,1); 126 md.cm_responses(md.nsteps+1:end)=[]; 127 127 found=1; 128 128 end … … 130 130 if ~found 131 131 third=ceil(md.nsteps/3); 132 md.fit=[2*ones(third,1);0*ones(third,1);repmat([0;0;2;0],third,1)]; 133 md.fit(md.nsteps+1:end)=[]; 132 md.cm_responses=[... 133 SurfaceLogVelMisfitEnum*ones(third,1);... 134 SurfaceAbsVelMisfitEnum*ones(third,1);... 135 repmat([SurfaceAbsVelMisfitEnum;SurfaceAbsVelMisfitEnum;SurfaceLogVelMisfitEnum;SurfaceAbsVelMisfitEnum],third,1)... 136 ]; 137 md.cm_responses(md.nsteps+1:end)=[]; 134 138 end 135 139 -
issm/trunk/src/m/classes/public/parameterization/parametercontroldrag.m
r5359 r5383 4 4 % It is possible to specify the number of steps, values for the 5 5 % minimum and maximum values of the drag, specify a noise dampening, the 6 % kind of fitto use or the the optscal.6 % kind of cm_responses to use or the the optscal. 7 7 % 8 8 % Usage: … … 11 11 % Example: 12 12 % md=parametercontroldrag(md) 13 % md=parametercontroldrag(md,'nsteps',20,'cm_noisedmp',10^-8,' fit',0)13 % md=parametercontroldrag(md,'nsteps',20,'cm_noisedmp',10^-8,'cm_responses',0) 14 14 % md=parametercontroldrag(md,'cm_min',1,'cm_max',150,'cm_jump',0.99,'maxiter',20) 15 15 % md=parametercontroldrag(md,'cm_maxdmp_value',100,'cm_maxdmp_slope',10^-13,,'cm_mindmp_value',10,'cm_mindmp_slope',10^-17) … … 118 118 end 119 119 120 % fit120 %cm_responses 121 121 found=0; 122 if exist(options,' fit'),123 fit=getfieldvalue(options,'fit');124 if ~any( fit~=0 & fit~=1 & fit~=2),125 md. fit=repmat(fit(:),md.nsteps,1);126 md. fit(md.nsteps+1:end)=[];122 if exist(options,'cm_responses'), 123 cm_responses=getfieldvalue(options,'cm_responses'); 124 if ~any(~ismember(cm_responses,[ SurfaceAbsVelMisfitEnum, SurfaceRelVelMisfitEnum, SurfaceLogVelMisfitEnum, SurfaceLogVxVyMisfitEnum, SurfaceAverageVelMisfitEnum ])); 125 md.cm_responses=repmat(cm_responses(:),md.nsteps,1); 126 md.cm_responses(md.nsteps+1:end)=[]; 127 127 found=1; 128 128 end … … 130 130 if ~found 131 131 third=ceil(md.nsteps/3); 132 md.fit=[2*ones(third,1);0*ones(third,1);repmat([0;0;2;0],third,1)]; 133 md.fit(md.nsteps+1:end)=[]; 132 md.cm_responses=[... 133 SurfaceLogVelMisfitEnum*ones(third,1);... 134 SurfaceAbsVelMisfitEnum*ones(third,1);... 135 repmat([SurfaceAbsVelMisfitEnum;SurfaceAbsVelMisfitEnum;SurfaceLogVelMisfitEnum;SurfaceAbsVelMisfitEnum],third,1)... 136 ]; 137 md.cm_responses(md.nsteps+1:end)=[]; 134 138 end 135 139
Note:
See TracChangeset
for help on using the changeset viewer.