varAlphaBeta
Call start with various alpha and beta with a specific ratio. (i.e. various input parameters for regularization parameters alpha and beta).
Warning: This function clears variables, creates a directory and files.
Contents
Syntax
varalphabeta
Description
Call start with various input parameters for the regularization parameters (sparsity) and
(total variation) in a specific ratio to tackle the inverse scattering problem with these parameters. This is useful to find suitable
and
.
Example
Set the values as a vector in this file, e.g.
alpha = [100; 500; 1000];
See varalpha.html or start.html for usage.
Input and Output Arguments
Input and Ouptut is analogous to varalpha.html.
See Also
Code
disp(' ') disp('----- Various alpha and beta... -----') disp(' ')
close all; clearvars -except inseti;
In-place setting of alpha:
% ---------------------------------------------------------------------- alpha = [100; 500; 1000]; % ----------------------------------------------------------------------
Process
Set usevaralpha to 1 and store current in alphaVal. Call start.
% Compute beta % default: seti.alpha = 500; seti.beta = 1E-5; q = 500/1E-5; % quotient beta = alpha/q; usevaralphabeta = 1; %#ok (suppress MATLAB warning, because will be needed in start.m) dirDatetime = datestr(now, 'yyyymmddTHHMMSS'); disAlphaBeta = zeros(length(alpha),1); errAlphaBeta = zeros(length(alpha),1); for i = 1:length(alpha) seti.dirDatetime = dirDatetime; alphaVal = alpha(i); betaVal = beta(i); seti.fileSuffix = sprintf('_iVar_%02d_alpha_%g_beta_%g',i,alphaVal,betaVal); %fprintf('%s:\n',seti.fileSuffix); start; close all; disAlphaBeta(i) = seti.dis(seti.iOutStop); errAlphaBeta(i) = seti.err(seti.iOutStop); clearvars -except inseti usevaralphabeta dirDatetime alpha beta i disAlphaBeta errAlphaBeta; end usevaralphabeta = 0;
Output
disp(' ') disp('Output') disp('columns: iVar | alpha | beta | dis | err') % out = [count alpha beta disAlphaBeta errAlphaBeta] % problem: scale... for i = 1:length(alpha) fprintf('%02d | %g | %g | %g | %g\n', i, alpha(i), beta(i), disAlphaBeta(i), errAlphaBeta(i)) end