%function qc = quatconj(q)
% produce conjugate quaternion
% if a scalar , b row vector (1x3 array)
% then    q  = (a, b)
%         qc = (a,-b)
function qc = quatconj(q)
         qc = [q(1), -q(2:4)];