function a = dcube(d) % function a = dcube(d) % a = [0 1; 1 0]; for i = 2:d, a = [a, speye(length(a)); speye(length(a)), a]; end