varalpha

Call start with various alpha (i.e. various input parameters for the regularization parameter alpha).

Warning: This function clears variables, creates a directory and files.

Contents

Syntax

varalpha

Description

Call start with various input parameters for the regularization parameter $\alpha$ (sparsity) to tackle the inverse scattering problem with these parameters. This is useful to find a suitable $\alpha$.

Example

Set the values as a vector in this file, e.g.

alpha = [100; 500; 1000];

In terminal:

inseti = 'example'; % setting of seti.alpha inside is overwrittten by varalpha
varalpha

See also start.html in section "Advanced starts".

Input Arguments

Set inseti before. Note that all other parameters will be cleared.

In-place Input

Define in this file.

alpha     : vector with values of several regularization parameters
            (the current parameter for computation is stored in
            |alphaVal|)

Output Arguments

Note that figures and results are stored in folder output.

More About

varalpha.html, varbeta.html, varalphabeta.html, vardelta.html and vartol.html have the same structure:

Vectors containing relative reconstruction errors...

See Also

Code

disp(' ')
disp('----- Various alpha... -----')
disp(' ')
close all;
clearvars -except inseti;

In-place setting of alpha:

% ----------------------------------------------------------------------
alpha = [100; 500; 1000];
% ----------------------------------------------------------------------

Process

Set usevaralpha to 1 and store current $\alpha$ in alphaVal. Call start.

usevaralpha = 1; %#ok (suppress MATLAB warning, because will be needed in start.m)
dirDatetime = datestr(now, 'yyyymmddTHHMMSS');
disAlpha = zeros(length(alpha),1);
errAlpha = zeros(length(alpha),1);
for i = 1:length(alpha)
    seti.dirDatetime = dirDatetime;
    alphaVal = alpha(i);
    seti.fileSuffix = sprintf('_iVar_%02d_alpha_%g',i,alphaVal);
    %fprintf('%s:\n',seti.fileSuffix);
    start;
    close all;
    disAlpha(i) = seti.dis(seti.iOutStop);
    errAlpha(i) = seti.err(seti.iOutStop);
    clearvars -except inseti usevaralpha dirDatetime alpha i disAlpha errAlpha;
end
usevaralpha = 0;

Output

disp(' ')
disp('Output')
disp('columns: iVar | alpha | dis | err')
for i = 1:length(alpha)
    fprintf('%02d | %g | %g | %g\n', i, alpha(i), disAlpha(i), errAlpha(i))
end