Thank you Sebastien for your very quick reply.
I just figured out that the code feature two other issues. Running the code in its actual form (simple version of extended path with order=0 + lmmcp=1) provides the following error message:
Unable to perform assignment because dot indexing is not supported for
variables of this type.
Error in extended_path_core (line 82)
[info_convergence, tmp] =
extended_path_homotopy(endo_simul, exo_simul, M, options, oo, pfm,
ep, order, algo, 2, debug);
tmp has been wrongly set line 44: ‘tmp’ is set as a matrix and is next called as a structure line 82.
I am not sure that ‘tmp’ needs to be set line 44 as it will stores the residual of the dynamic equations. So i would simply write line 44:
[info_convergence] = bytecode(…
With this typo solved, another error pops up:
Unrecognized function or variable 'info_convergence'.
Error in extended_path_core (line 80)
if ~info_convergence && ~options.no_homotopy
if the bytecode function returns flag=0 line 44, then ‘info_convergence’ is not set, so the code line 80 cannot work.