normroi

Computes the norm of a vector on the region of interest.

Contents

Syntax

n = normroi(x,seti,q)
n = normroi(x,seti)

Description

Input Arguments

Output Arguments

More About

$\|x\|_{\mathrm{roi},q} := \left( h_N^d \sum_i |x_i|^q \right)^{1/q}$ for $x \in \bf{C}^{N_D}$

with $N_D = \texttt{seti.nROI}^\texttt{seti.dim}$ and $h_N^d = \texttt{seti.dV}$.

References

See Also

Code

function n = normroi(x,seti,q)

if nargin == 2
    Q = seti.qNorm;
elseif nargin == 3
    Q = q;
end

dV = seti.dV;

if Q == 2
    n = sqrt(abs(innerroi(x,x,seti)));
else
    n = norm(x(:),Q)*dV^(1/Q); % in case Q = 2 the result is the same as above
end

end