Roberts basis in matlab
lBasis:
l  W1 = 1/2*[
1 1
  1 1];

W2 = 1/sqrt(2)*[
0 1
-1 0];

W3 = 1/sqrt(2)*[
1 0
  0 -1];

W4 = 1/2*[
-1 1
   1 -1];
l
lTest region:
l  CR = [
5 5
  5 5];

% Coefficients:
c1 = sum(sum(W1.*CR))
% c1 = 10

c2 = sum(sum(W2.*CR))
% c2 = 0

% Do same for W3 and W4