function x = misconv(x,n) % converts x from [1:2n] % to +/-1, +/-2, ... +/-n x = x.*(x <= n) + (n-x).*(x > n); return