inAuto02eval

Internal function of autoparam3, autoparam3alpha, autoparam3beta.

    % -- start: Reconstruct with alpha and beta --
    seti.dirDatetime = dirDatetime;
    alphaVal = alpha(i);
    betaVal = beta(i);
    seti.fileSuffix = sprintf('_iVar_%02d_alpha_%g_beta_%g',i,alphaVal,betaVal);
    if ~exist('dummybeta','var')
        dummybeta = 0;
    end
    if dummy
        % dummy function for fast results to test the automatic parameter choice
        tau = 2.5;
        delta = 0.01;
        if dummybeta
            disAlphaBeta(i) = (tau*delta)/(500+10)^2*(beta(i)+10).^2;
        else % dummy with alpha
            disAlphaBeta(i) = (tau*delta)/(500+10)^2*(alpha(i)+10).^2;
        end
        errAlphaBeta(i) = 0;
        % disAlphaBeta(500) = tau*delta
        % So it should find 500 as result...
        iOutStop = 0; % define it to omit an error in clearvars...
    else
        evalc('start'); % Execution of start without display output.
        disAlphaBeta(i) = seti.dis(seti.iOutStop);
        errAlphaBeta(i) = seti.err(seti.iOutStop);
        tau = seti.tau;
        delta = seti.delta;
        iOutStop = seti.iOutStop;
    end
    close all;
    clearvars -except inseti usevaralphabeta dirDatetime alpha beta i disAlphaBeta disPrincAlphaBeta errAlphaBeta tau delta iOutStop N q idlast3 a b c da db dc startbis dpfirst dummy dummybeta ticAutoParam;
    % -- end: Reconstruct with alpha and beta --

    if (disAlphaBeta(i) <= tau*delta)
        dp = 1; % break because discrepancy principle
    else
        dp = 0;
    end
    disPrincAlphaBeta(i) = dp;

    % -- Output: start --
    disp(' ')
    disp('Output')
    disp('columns: iVar | alpha | beta | iOutStop | dis | disPrinc | err')
    fprintf('%02d | %g | %g | %g | %g | %g | %g\n', i, alpha(i), beta(i), iOutStop, disAlphaBeta(i), disPrincAlphaBeta(i), errAlphaBeta(i))
    % -- Output: end --