function  [yhat, jcb, dy_x] = getJacobian(nlobj, x, doParJac)
%getJacobian: single object Jacobian.
%
% doParJac: if false, jcb is not calculated.

% Copyright 2021 The MathWorks, Inc.

if nargin<3
   doParJac = true;
end

if nargout<2
   yhat = soevaluate(nlobj,x);
elseif nargout==2 && doParJac
   error(message('Ident:analysis:ParJacobianNotAvailable','idSupportVectorMachine'))
else
   dy_x = numjac(nlobj,x);
   yhat = soevaluate(nlobj,x);
   jcb = [];
end
