https://github.com/vegarant/spgl1
Tip revision: 5b6ee1e77c0a24b8f50d6462478cc2a5b09f5622 authored by Michael Friedlander on 26 April 2016, 15:40:32 UTC
Move webpage to UBC.
Move webpage to UBC.
Tip revision: 5b6ee1e
NormL12_primal.m
function p = NormL12_primal(g,x,weights)
m = round(length(x) / g); n = g;
if isreal(x)
p = sum(weights.*sqrt(sum(reshape(x,m,n).^2,2)));
else
p = sum(weights.*sqrt(sum(abs(reshape(x,m,n)).^2,2)));
end