function [v_plus_null, v_mins_null, v_null_plus, v_null_mins] = shift_values(v)
  v_plus_null = [v(:, 2:end), v(:, end)];
  v_mins_null = [v(:, 2), v(:, 1:end - 1)];
  v_null_plus = [v(2:end, :); v(end, :)];
  v_null_mins = [v(2, :); v(1:end - 1, :)];
  
  N = rows(v);
  v_plus_null(logical(fliplr(eye(N)))) = 2 * v(logical(fliplr(eye(N)))) - v_mins_null(logical(fliplr(eye(N))));
  v_plus_null(logical(fliplr(eye(N)))) = 2 * v(logical(fliplr(eye(N)))) - v_null_mins(logical(fliplr(eye(N))));
endfunction
