I also found the following
commit talking about it's implementation, but the sample code provided is in python. Will the equivalent syntax in Matlab be as follows?
param = MX.sym('param',(2*num_dof_total+num_local_dof),1);
f_constraint_fun = Function('f_constraint_fun',{states_kj,param},...
{Local_state_map_fun( param(1:2*num_dof_total,1) , states_kj , param((2*num_dof_total+1):(2*num_dof_total+num_local_dof),1) )},...
{'states_kj','param'},{'f_constraint_fun'});
constrint_manifold=rootfinder('constrint_manifold', 'newton', 'x', states_kj, 'p', param, 'g', f_constraint_fun);
To use it, I am hoping this way will work:
x_temp_proj(1,:) = constrint_manifold(x_temp_for(1,:)' , [x_init(1,:)' ; delta_y])';
I will update here in case it works.