Error in gmm_2stage_estimation (line 54)
trialx = trialx/m_fminunc;
Error in master (line 564)
gmm_2stage_estimation;
'''monte-compare-patternsearch'''
Error using poptimfcnchk (line 27)
Your objective function must return a scalar value.
Error in patternsearch (line 348)
[Iterate,OUTPUT.funccount] = poptimfcnchk(FUN,nonlcon,initialX,Iterate, ...
Error in gmm_2stage_estimation (line 96)
[x_est_1st(nn, :), trialfval(nn)] = patternsearch(@msmf_corr_coeff, trialx(nn, :),
[], [], [], [], LB, UB, @nonlinearcons_msm, options_ps);
Error in master (line 564)
gmm_2stage_estimation;
'''monte-compare-cmaes'''
In an assignment A(:) = B, the number of elements in A and B must be the same.
Error in cmaes (line 642)
fitness.hist(1)=feval(fitfun, xmean, varargin{:});
Error in gmm_2stage_estimation (line 64)
x_1st =cmaes('msmf_corr_coeff', trialx(end, :), 0.5, opts)';
Error in master (line 564)
gmm_2stage_estimation;