# fresnelMiss

Auxiliary function to deal with the missing transmitter-receiver links in Institute Fresnel's data set.

## Contents

- Syntax
- Description
- Input Arguments
- Output Arguments
- More About
- See Also
- Code

## Syntax

    fresnelMiss(A,FmeasDeltaFresnel)

## Description

`A = fresnelMiss(A,FmeasDeltaFresnel)` identifies the missing transmitter-receiver links in Institute Fresnel's data set, that are given as `NaN` in `FmeasDeltaFresnel`, and transfers the missing links to `A` by set the corresponding entries to zero.

## Input Arguments

- `A` : Matrix.
- `FmeasDeltaFresnel` : Matrix with Institute Fresnel's data.

## Output Arguments

- `A` : Matrix as input matrix `A` with missing links set to zero.

## More About

This is fuxiliary function is needed in the routines `fresnelSynthPaper` and `fresnelSynthNuMaxVarPublic` (as well as their intern predecessors `fresnelSynth` and `frenselSynthNuMaxVar`).

Note that Institute Fresnel's data set contains missing links for metrological reasons.

## See Also

- fresnelSynthPaper.html
- fresnelSynthNuMaxVar.html

## Code

    function A = fresnelMiss(A,FmeasDeltaFresnel)

    % miss: missing values (NaN in FmeasDeltaFresnel) are set to 0.
    % In IPscatt is FmeasDeltaFresnel available as seti.FmeasDelta.

Define a Mask (unsused)

    % Introducing MM (missing mask) (this could be also used in loadData.m).
    % Missing data in Institute Fresnel's data set is marked with 0 (otherwise 1).
    MM = ones(size(FmeasDeltaFresnel));
    MM(isnan(FmeasDeltaFresnel)) = 0;
    % 0: entry is missing in FmeasDeltaFresnel
    % 1: entry is available in FmeasDeltaFresnel

    % MM.*A does not work, if A contains NaN entries because 0*NaN = NaN.
    % Otherwise it would work
    % Maybe use it in case of synthetic data stored in A.

Identify NaN Entries

    % loadData: in a workaround NaN values were set to 0
    % (until missing values are otherwise taken into account).
    % So, set values in A to zero if they are not a number in FmeasDeltaFresnel.

    A(isnan(FmeasDeltaFresnel)) = 0; % This is also used in loadData.m.

Transfer Entries with 0

    A(FmeasDeltaFresnel==0) = 0;

    end