Well the answer is that someone has to split real and imaginary parts and use lsqcurvefit instead.
e.g. based on the above example (requires less than 5 iterations with wider bounds and less accurate initial guess)
Cheers
% function to be assigned to the function handle
function [Zcap] = randles_cap(c,xdata)
Zcap = zeros(length(xdata),2);
Ztotal = c(1)+(1./(1i.*xdata.*c(2)));
Zcap(:,1) = real(Ztotal); Zcap(:,2) = imag(Ztotal);
%% fit model to artificial data
% artificial data generation
xdata = logspace(5,-1,50)';
c0 = [5 1e-4];
cplxydata = c0(1)+(1./(1i.*xdata.*c0(2)));
ydata2 = [real(cplxydata),imag(cplxydata)];
% initial values, bounds and function handle
x0 = [0.01 5e-8]; % initial guess
fitfcn = @(c,xdata)randles_cap(c,xdata);
[lb] = [1e-2 1e-9]; ub = [1e2 1e-3];
% fit model using lsqcurvefit (optional)
opts = optimoptions(@lsqcurvefit,'Display','off');
[vestimated,resnorm,residuals,exitflag,output] = ...
lsqcurvefit(@cplxreal,x0,xdata,ydata2,lb,ub);
vestimated,resnorm,exitflag,output.firstorderopt;
% fit model using lsqcurvefit with multistart
problem = createOptimProblem('lsqcurvefit','x0',x0,'objective',fitfcn,...
'lb',lb,'ub',ub,'xdata',xdata,'ydata',ydata2);
ms = MultiStart('PlotFcns',@gsplotbestf);
[xmulti,errormulti] = run(ms,problem,500)
%% result
MultiStart completed the runs from all start points.
All 500 local solver runs converged with a positive local solver exit flag.
xmulti =
5.000000000000000 0.000100000000000
errormulti =
0