function [opt_st, u_pr, y_pr, cv_pr] = fcn( nu, ny, Np)%#codegen
coder.extrinsic('mpc_ea');opt_st = zeros(1); u_pr = zeros(nu,Np+1); y_pr = zeros(ny,Np+1); cv_pr =zeros(1);[opt_st, u_pr, y_pr, cv_pr] = mpc_ea;
MATLAB: When I run this function, it gives the error “Data ‘u_pr’ (#427) is inferred as a variable size matrix, while its specified type is something else.”. What is the solution for this problem? I will be happy for helps.
embedded matlab functionmatlab coder
Best Answer