function u = get_u(obj, verbose_int)
coder.extrinsic('libpointer','calllib');
u_soln = zeros(1, obj.N - 1,'single');
u_soln_ptr = libpointer('singlePtr', u_soln);
calllib(obj.lib_name, 'get_u', u_soln_ptr, int32(verbose_int));
u = get(u_soln_ptr, 'Value');
end
If output dim >1,the function "get_u" always get a 1dim matrix and Matlab will crush.
Changeu_soln = zeros(1, obj.N - 1,'single'); to u_soln = zeros(obj.m, obj.N - 1,'single'); can fix.
class TinyMPC:
If output dim >1,the function "get_u" always get a 1dim matrix and Matlab will crush. Change
u_soln = zeros(1, obj.N - 1,'single');
tou_soln = zeros(obj.m, obj.N - 1,'single');
can fix.