

% Author: Nathanael Perraudin % Date: October 2011 % Testing: test_mixed_sparsity % Optional input arguments if nargin 1 n21 = 0 for ii = 1 : size ( g_d, 1 ) n21 = n21 + norm_l21 ( x, g_d ( ii ,:), g_t ( ii ,:).
NUMEL MATLAB LICENSE
% % You should have received a copy of the GNU General Public License % along with this program. See the % GNU General Public License for more details. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
NUMEL MATLAB SOFTWARE
% This file is part of UNLOCBOX version 1.7.4 % % This program is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the License, or % (at your option) any later version.

% % See also: norm_linf1 norm_tv % % Url: % Copyright (C) 2012-2016 Nathanael Perraudin. % % Example: % x= % Group 1: % Group 2: % % Leads to % % => g_d= and g_t= % Or this is also possible % => g_d= and g_t= % % This function works also for overlapping groups. g_d contain the indices of the % element to be group and g_t the size of different groups. % % 'norm_l21(x)' with x a row vector is equivalent to norm(x,1) and % 'norm_l21(x)' with x a line vector is equivalent to norm(x) % % For fancy group, please provide the groups vectors. If x is a % matrix the 2 norm will be computed as follow: % % n21 = || x ||_21 = sum_j ( sum_i |x(i,j)|^2 )^(1/2) % % In this case, all other argument are not necessary. Function n21 = norm_l21 (x, g_d,g_t, w2,w1 ) %NORM_L21 L21 mixed norm % Usage: n21 = norm_l21(x) % n21 = norm_l21(x, g_d,g_t) % n21 = norm_l21(x, g_d,g_t, w2,w1) % % Input parameters: % x : Input data % g_d : group vector 1 % g_t : group vector 2 % w2 : weights for the two norm (default 1) % w1 : weights for the one norm (default 1) % Output parameters: % y : Norm % % NORM_L21(x, g_d,g_t, w2,w1) returns the norm L21 of x.
