Error using...Plus....matrix dimensions must agree

I am running model based on IRF-MATCHING Approach. I am getting message as:

Error using +
Matrix dimensions must agree.
Error in csminit (line 125)
dxtest=x0+dx’*lambda;
Error in csminwel (line 101)
[f1 x1 fc retcode1] = csminit(fcn,x,f,g,badg,H,varargin{:});
Error in IRFNEW (line 295)
[fhat,x_opt_hat]=csminwel(@IRF_matching_objective,x_start,H0,[],crit,nit,IRF_empirical,IRF_weighting);
Error in dynare (line 235)
evalin(‘base’,fname) ;

Without seeing the codes, it is impossible to tell.

here is codeIRFNEW.mod (5.0 KB) IRF_matching_objective.m (1.1 KB) get_empirical_IRFs.m (5.7 KB) build_companionform.m (608 Bytes)

sir plz suggest regarding these errors

Which Dynare version and which csminwel are you using?

that problem is solved as I have changed the upper and lower bounds.
now error is:
Output argument “IRF_model” (and maybe others) not assigned during call to “IRF_matching_objective”.
Error in IRFNEW (line 285)
[fval,IRF_model]=IRF_matching_objective(x_opt_hat,IRF_empirical,IRF_weighting);
Error in dynare (line 235)
evalin(‘base’,fname) ;

Dear Madihaatif,
thank you for your message, I could use your help if you have found the source of the problem. I have the same.

Thanks in advance
Best

what problem you are facing?

I received the exact same error message as yours.
Output argument “IRF_model” (and maybe others) not assigned during call to “IRF_matching_objective”

Thanks for your help

share your 'IRF_matching_objective". I resolved issue using forum. may be it helps for you also