How do I solve "Error in port widths or dimensions" error in Simulink?
4 views (last 30 days)
Ankit on 2 Oct 2020
function input = C_REG(q)
% global k_1 k_2
% driving velocity
% steering velocity
input = [v;omega];
you have to careful with matrix/vector multiplication. your e_p [1 x2 ] and sag [2x1] --> multiplication of e_p and sag gives a matrix of [2x2] and multiply with k1  results in a vector of [1x2] --> driving velocity
and similarly omega is a scalar.
Could you please explain what is your expected output ? steering velocity vector or scalar.
and similary driving velocity?