I have very complicated matrices and vectors which consist of "dirac". To run dirac command in SIMULINK, i use coder.extrinsic('dirac'), nevertheless my block cannot work. SIMULINK gives an error:
Expected either a logical, char, int, fi, single, or double. Found an mxArray. MxArrays are returned from calls to the MATLAB interpreter and are not supported inside expressions. They may only be used on the right-hand side of assignments and as arguments to extrinsic functions.
Function 'MMM' (#228.1467.1878), line 11, column 1172:
"0.027696559278073379663632195329385*dirac(tan(beta - (1.0*lr*yaw_angle)/v_x) - 0"
Launch diagnostic report.
function [A_delta,B_delta,C_delta,D_delta] = fcn(u,beta, w_z, yaw_angle, lat_pos,mu_road,v_x,m_total,lf,lr,J_z)