function vec = set_rot(gain, phase, theta)

% Coefficients max at 1/sin(theta), so scale the gain setting down
%gain_scale = sin(theta);
gain_scale=1;

vec = [gain_scale -cos(theta); 0 1] * gain * ...
      [cos(-phase/180*pi); sin(-phase/180*pi)];
