void ekf_update_api(const mxArray * const prhs[7], const mxArray *plhs[2]) { real_T (*x_k_k)[5]; real_T (*P_k_k)[25]; real_T (*x_kk_kk)[5]; real_T (*zm_k)[5]; real_T (*m0)[2]; real_T (*P_kk_kk)[25]; real_T (*Q)[25]; real_T (*R)[36]; real_T dt; emlrtStack st = { NULL, NULL, NULL }; st.tls = emlrtRootTLSGlobal; x_k_k = (real_T (*)[5])mxMalloc(sizeof(real_T [5])); P_k_k = (real_T (*)[25])mxMalloc(sizeof(real_T [25])); /* Marshall function inputs */ x_kk_kk = c_emlrt_marshallIn(&st, emlrtAlias(prhs[0]), "x_kk_kk"); zm_k = c_emlrt_marshallIn(&st, emlrtAlias(prhs[1]), "zm_k"); m0 = e_emlrt_marshallIn(&st, emlrtAlias(prhs[2]), "m0"); P_kk_kk = g_emlrt_marshallIn(&st, emlrtAlias(prhs[3]), "P_kk_kk"); Q = g_emlrt_marshallIn(&st, emlrtAlias(prhs[4]), "Q"); R = i_emlrt_marshallIn(&st, emlrtAlias(prhs[5]), "R"); dt = k_emlrt_marshallIn(&st, emlrtAliasP(prhs[6]), "dt"); /* Invoke the target function */ ekf_update(&st, *x_kk_kk, *zm_k, *m0, *P_kk_kk, *Q, *R, dt, *x_k_k, *P_k_k); /* Marshall function outputs */ plhs[0] = c_emlrt_marshallOut(*x_k_k); plhs[1] = d_emlrt_marshallOut(*P_k_k); }
/* * Arguments : const emlrtStack *sp * const mxArray *u * const emlrtMsgIdentifier *parentId * Return Type : real_T */ static real_T b_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const emlrtMsgIdentifier *parentId) { real_T y; y = k_emlrt_marshallIn(sp, emlrtAlias(u), parentId); emlrtDestroyArray(&u); return y; }
void swipep_api(const mxArray *prhs[8], const mxArray *plhs[3]) { emxArray_real_T *x; emxArray_real_T *p; emxArray_real_T *t; emxArray_real_T *s; real_T fs; real_T (*plim)[2]; real_T dt; real_T dlog2p; real_T dERBs; real_T woverlap; real_T sTHR; emlrtStack st = { NULL, NULL, NULL }; st.tls = emlrtRootTLSGlobal; emlrtHeapReferenceStackEnterFcnR2012b(&st); emxInit_real_T(&st, &x, 1, true); emxInit_real_T(&st, &p, 1, true); emxInit_real_T(&st, &t, 1, true); emxInit_real_T(&st, &s, 1, true); prhs[0] = emlrtProtectR2012b(prhs[0], 0, false, -1); prhs[2] = emlrtProtectR2012b(prhs[2], 2, false, -1); /* Marshall function inputs */ emlrt_marshallIn(&st, emlrtAlias(prhs[0]), "x", x); fs = g_emlrt_marshallIn(&st, emlrtAliasP(prhs[1]), "fs"); plim = k_emlrt_marshallIn(&st, emlrtAlias(prhs[2]), "plim"); dt = g_emlrt_marshallIn(&st, emlrtAliasP(prhs[3]), "dt"); dlog2p = g_emlrt_marshallIn(&st, emlrtAliasP(prhs[4]), "dlog2p"); dERBs = g_emlrt_marshallIn(&st, emlrtAliasP(prhs[5]), "dERBs"); woverlap = g_emlrt_marshallIn(&st, emlrtAliasP(prhs[6]), "woverlap"); sTHR = g_emlrt_marshallIn(&st, emlrtAliasP(prhs[7]), "sTHR"); /* Invoke the target function */ swipep(x, fs, *plim, dt, dlog2p, dERBs, woverlap, sTHR, p, t, s); /* Marshall function outputs */ plhs[0] = c_emlrt_marshallOut(p); plhs[1] = c_emlrt_marshallOut(t); plhs[2] = c_emlrt_marshallOut(s); s->canFreeData = false; emxFree_real_T(&s); t->canFreeData = false; emxFree_real_T(&t); p->canFreeData = false; emxFree_real_T(&p); x->canFreeData = false; emxFree_real_T(&x); emlrtHeapReferenceStackLeaveFcnR2012b(&st); }
void TestBemHeatEq_optimized_api(const mxArray * const prhs[4], const mxArray *plhs[2]) { emxArray_real_T *sigIn; emxArray_real_T *u; emxArray_real_T *r; real_T regOrder; real_T lambda; boolean_T plotFlag; emlrtStack st = { NULL, NULL, NULL }; st.tls = emlrtRootTLSGlobal; emlrtHeapReferenceStackEnterFcnR2012b(&st); emxInit_real_T(&st, &sigIn, 2, &ub_emlrtRTEI, true); emxInit_real_T(&st, &u, 2, &ub_emlrtRTEI, true); b_emxInit_real_T(&st, &r, 1, &ub_emlrtRTEI, true); /* Marshall function inputs */ e_emlrt_marshallIn(&st, emlrtAlias(prhs[0]), "sigIn", sigIn); regOrder = c_emlrt_marshallIn(&st, emlrtAliasP(prhs[1]), "regOrder"); lambda = c_emlrt_marshallIn(&st, emlrtAliasP(prhs[2]), "lambda"); plotFlag = k_emlrt_marshallIn(&st, emlrtAliasP(prhs[3]), "plotFlag"); /* Invoke the target function */ TestBemHeatEq_optimized(&st, sigIn, regOrder, lambda, plotFlag, u, r); /* Marshall function outputs */ plhs[0] = f_emlrt_marshallOut(u); plhs[1] = g_emlrt_marshallOut(r); r->canFreeData = false; emxFree_real_T(&r); u->canFreeData = false; emxFree_real_T(&u); sigIn->canFreeData = false; emxFree_real_T(&sigIn); emlrtHeapReferenceStackLeaveFcnR2012b(&st); }
/* * Arguments : const emlrtStack *sp * const mxArray *u * const emlrtMsgIdentifier *parentId * struct0_T *y * Return Type : void */ static void h_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const emlrtMsgIdentifier *parentId, struct0_T *y) { emlrtMsgIdentifier thisId; static const char * fieldNames[32] = { "vehVelMin", "vehVelMax", "vehAccMax", "vehAccMin", "drgCof", "vehMas", "whlRolResCof", "whlDrr", "batRstChr", "batRstDch", "batOcvCof_batEng", "batEngMax", "batPwrMax", "batPwrMin", "geaRat", "geaEfy", "iceSpdMgd", "iceTrqMgd", "fulDen", "fulLhv", "iceFulPwr_iceSpd_iceTrq", "iceTrqMaxCof", "iceTrqMinCof", "emoSpdMgd", "emoTrqMgd", "emoPwr_emoSpd_emoTrq", "emoTrqMin_emoSpd", "emoTrqMax_emoSpd", "emoPwrMgd", "emoTrq_emoSpd_emoPwr", "emoPwrMax_emoSpd", "emoPwrMin_emoSpd" }; thisId.fParent = parentId; emlrtCheckStructR2012b(sp, parentId, u, 32, fieldNames, 0U, 0); thisId.fIdentifier = "vehVelMin"; y->vehVelMin = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "vehVelMin")), &thisId); thisId.fIdentifier = "vehVelMax"; y->vehVelMax = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "vehVelMax")), &thisId); thisId.fIdentifier = "vehAccMax"; y->vehAccMax = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "vehAccMax")), &thisId); thisId.fIdentifier = "vehAccMin"; y->vehAccMin = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "vehAccMin")), &thisId); thisId.fIdentifier = "drgCof"; y->drgCof = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "drgCof")), &thisId); thisId.fIdentifier = "vehMas"; y->vehMas = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "vehMas")), &thisId); thisId.fIdentifier = "whlRolResCof"; y->whlRolResCof = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "whlRolResCof")), &thisId); thisId.fIdentifier = "whlDrr"; y->whlDrr = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "whlDrr")), &thisId); thisId.fIdentifier = "batRstChr"; y->batRstChr = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "batRstChr")), &thisId); thisId.fIdentifier = "batRstDch"; y->batRstDch = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "batRstDch")), &thisId); thisId.fIdentifier = "batOcvCof_batEng"; i_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "batOcvCof_batEng")), &thisId, y->batOcvCof_batEng); thisId.fIdentifier = "batEngMax"; y->batEngMax = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "batEngMax")), &thisId); thisId.fIdentifier = "batPwrMax"; y->batPwrMax = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "batPwrMax")), &thisId); thisId.fIdentifier = "batPwrMin"; y->batPwrMin = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "batPwrMin")), &thisId); thisId.fIdentifier = "geaRat"; j_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "geaRat")), &thisId, y->geaRat); thisId.fIdentifier = "geaEfy"; y->geaEfy = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "geaEfy")), &thisId); thisId.fIdentifier = "iceSpdMgd"; k_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "iceSpdMgd")), &thisId, y->iceSpdMgd); thisId.fIdentifier = "iceTrqMgd"; k_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "iceTrqMgd")), &thisId, y->iceTrqMgd); thisId.fIdentifier = "fulDen"; y->fulDen = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "fulDen")), &thisId); thisId.fIdentifier = "fulLhv"; y->fulLhv = b_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "fulLhv")), &thisId); thisId.fIdentifier = "iceFulPwr_iceSpd_iceTrq"; k_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "iceFulPwr_iceSpd_iceTrq")), &thisId, y->iceFulPwr_iceSpd_iceTrq); thisId.fIdentifier = "iceTrqMaxCof"; l_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "iceTrqMaxCof")), &thisId, y->iceTrqMaxCof); thisId.fIdentifier = "iceTrqMinCof"; l_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "iceTrqMinCof")), &thisId, y->iceTrqMinCof); thisId.fIdentifier = "emoSpdMgd"; k_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "emoSpdMgd")), &thisId, y->emoSpdMgd); thisId.fIdentifier = "emoTrqMgd"; k_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "emoTrqMgd")), &thisId, y->emoTrqMgd); thisId.fIdentifier = "emoPwr_emoSpd_emoTrq"; k_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "emoPwr_emoSpd_emoTrq")), &thisId, y->emoPwr_emoSpd_emoTrq); thisId.fIdentifier = "emoTrqMin_emoSpd"; m_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "emoTrqMin_emoSpd")), &thisId, y->emoTrqMin_emoSpd); thisId.fIdentifier = "emoTrqMax_emoSpd"; m_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "emoTrqMax_emoSpd")), &thisId, y->emoTrqMax_emoSpd); thisId.fIdentifier = "emoPwrMgd"; k_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "emoPwrMgd")), &thisId, y->emoPwrMgd); thisId.fIdentifier = "emoTrq_emoSpd_emoPwr"; k_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "emoTrq_emoSpd_emoPwr")), &thisId, y->emoTrq_emoSpd_emoPwr); thisId.fIdentifier = "emoPwrMax_emoSpd"; m_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "emoPwrMax_emoSpd")), &thisId, y->emoPwrMax_emoSpd); thisId.fIdentifier = "emoPwrMin_emoSpd"; m_emlrt_marshallIn(sp, emlrtAlias(emlrtGetFieldR2013a(sp, u, 0, "emoPwrMin_emoSpd")), &thisId, y->emoPwrMin_emoSpd); emlrtDestroyArray(&u); }
static void d_emlrt_marshallIn(const mxArray *u, const emlrtMsgIdentifier *parentId, emxArray_real_T *y) { k_emlrt_marshallIn(emlrtAlias(u), parentId, y); emlrtDestroyArray(&u); }