void SDRuReceiver_stepImpl(transceive102StackData *SD, const emlrtStack *sp, const comm_SDRuReceiver *obj, creal_T y[1408], uint32_T *dataLen) { real_T fc; real_T loOffset; real_T gain; real_T decim; int32_T errMsg_size[2]; char_T errMsg_data[1024]; UsrpErrorCapiEnumT errStatus; uint32_T overrun; int32_T i; emlrtStack st; st.prev = sp; st.tls = sp->tls; fc = obj->CenterFrequency; loOffset = obj->LocalOscillatorOffset; gain = obj->Gain; decim = obj->DecimationFactor; st.site = &ab_emlrtRSI; receiveData(&st, obj->pDriverHandle, fc, loOffset, gain, decim, SD->f0.yTemp, dataLen, &overrun, &errStatus, errMsg_data, errMsg_size); if (errStatus != UsrpDriverSuccess) { st.site = &ab_emlrtRSI; b_error(&st, errMsg_data, errMsg_size); } for (i = 0; i < 1408; i++) { y[i].re = SD->f0.yTemp[i].re; y[i].im = SD->f0.yTemp[i].im; fc = y[i].im; y[i].re *= 3.0518509475997192E-5; y[i].im = 3.0518509475997192E-5 * fc; } }
void SDRuTransmitter_stepImpl(testMACReceiverStackData *SD, const emlrtStack *sp, const comm_SDRuTransmitter *obj, const creal_T x[38400]) { real_T fc; real_T loOffset; real_T gain; real_T interp; int32_T errMsg_size[2]; char_T errMsg_data[1024]; UsrpErrorCapiEnumT errStatus; uint32_T underrun; emlrtStack st; st.prev = sp; st.tls = sp->tls; fc = obj->CenterFrequency; loOffset = obj->LocalOscillatorOffset; gain = obj->Gain; interp = obj->InterpolationFactor; st.site = &rj_emlrtRSI; sendComplexDoubleData(SD, &st, obj->pDriverHandle, x, fc, loOffset, gain, interp, &underrun, &errStatus, errMsg_data, errMsg_size); if (errStatus != UsrpDriverSuccess) { st.site = &rj_emlrtRSI; b_error(&st, errMsg_data, errMsg_size); } }
/* Function Definitions */ void do_vectors(const emlrtStack *sp, const real_T a_data[1224], const int32_T a_size[1], const real_T b[8], real_T c_data[8], int32_T c_size[1], int32_T ia_data[8], int32_T ia_size[1], int32_T ib_data[8], int32_T ib_size[1]) { int32_T ncmax; boolean_T y; int32_T ialast; boolean_T exitg4; boolean_T guard9 = FALSE; boolean_T p; boolean_T exitg3; boolean_T guard8 = FALSE; int32_T nc; int32_T iafirst; int32_T ibfirst; int32_T iblast; int32_T b_ialast; real_T ak; boolean_T exitg2; real_T absxk; int32_T exponent; boolean_T guard6 = FALSE; boolean_T guard7 = FALSE; int32_T b_iblast; real_T bk; boolean_T exitg1; int32_T b_exponent; boolean_T guard4 = FALSE; boolean_T guard5 = FALSE; int32_T c_exponent; boolean_T guard2 = FALSE; boolean_T guard3 = FALSE; boolean_T guard1 = FALSE; const mxArray *b_y; const mxArray *m20; int32_T b_ia_data[8]; const mxArray *c_y; const mxArray *d_y; real_T b_c_data[8]; emlrtStack st; st.prev = sp; st.tls = sp->tls; st.site = &fp_emlrtRSI; ncmax = muIntScalarMin_sint32(a_size[0], 8); c_size[0] = (int8_T)ncmax; ia_size[0] = ncmax; ib_size[0] = ncmax; st.site = &gp_emlrtRSI; y = TRUE; if (a_size[0] == 0) { } else { ialast = 1; exitg4 = FALSE; while ((exitg4 == FALSE) && (ialast <= a_size[0] - 1)) { guard9 = FALSE; if (a_data[ialast - 1] <= a_data[ialast]) { guard9 = TRUE; } else if (muDoubleScalarIsNaN(a_data[ialast])) { guard9 = TRUE; } else { p = FALSE; } if (guard9 == TRUE) { p = TRUE; } if (!p) { y = FALSE; exitg4 = TRUE; } else { ialast++; } } } if (!y) { st.site = &hp_emlrtRSI; eml_error(&st); } st.site = &ip_emlrtRSI; y = TRUE; ialast = 1; exitg3 = FALSE; while ((exitg3 == FALSE) && (ialast < 8)) { guard8 = FALSE; if (b[ialast - 1] <= b[ialast]) { guard8 = TRUE; } else if (muDoubleScalarIsNaN(b[ialast])) { guard8 = TRUE; } else { p = FALSE; } if (guard8 == TRUE) { p = TRUE; } if (!p) { y = FALSE; exitg3 = TRUE; } else { ialast++; } } if (!y) { st.site = &jp_emlrtRSI; b_eml_error(&st); } nc = 0; iafirst = 0; ialast = 0; ibfirst = 0; iblast = 0; while ((ialast + 1 <= a_size[0]) && (iblast + 1 <= 8)) { st.site = &kp_emlrtRSI; b_ialast = ialast + 1; ak = a_data[ialast]; exitg2 = FALSE; while ((exitg2 == FALSE) && (b_ialast < a_size[0])) { absxk = muDoubleScalarAbs(a_data[ialast] / 2.0); if ((!muDoubleScalarIsInf(absxk)) && (!muDoubleScalarIsNaN(absxk))) { if (absxk <= 2.2250738585072014E-308) { absxk = 4.94065645841247E-324; } else { frexp(absxk, &exponent); absxk = ldexp(1.0, exponent - 53); } } else { absxk = rtNaN; } guard6 = FALSE; guard7 = FALSE; if (muDoubleScalarAbs(a_data[ialast] - a_data[b_ialast]) < absxk) { guard7 = TRUE; } else if (muDoubleScalarIsInf(a_data[b_ialast])) { if (muDoubleScalarIsInf(a_data[ialast]) && ((a_data[b_ialast] > 0.0) == (a_data[ialast] > 0.0))) { guard7 = TRUE; } else { guard6 = TRUE; } } else { guard6 = TRUE; } if (guard7 == TRUE) { p = TRUE; } if (guard6 == TRUE) { p = FALSE; } if (p) { b_ialast++; } else { exitg2 = TRUE; } } ialast = b_ialast - 1; st.site = &lp_emlrtRSI; b_iblast = iblast + 1; bk = b[iblast]; exitg1 = FALSE; while ((exitg1 == FALSE) && (b_iblast < 8)) { absxk = muDoubleScalarAbs(b[iblast] / 2.0); if ((!muDoubleScalarIsInf(absxk)) && (!muDoubleScalarIsNaN(absxk))) { if (absxk <= 2.2250738585072014E-308) { absxk = 4.94065645841247E-324; } else { frexp(absxk, &b_exponent); absxk = ldexp(1.0, b_exponent - 53); } } else { absxk = rtNaN; } guard4 = FALSE; guard5 = FALSE; if (muDoubleScalarAbs(b[iblast] - b[b_iblast]) < absxk) { guard5 = TRUE; } else if (muDoubleScalarIsInf(b[b_iblast])) { if (muDoubleScalarIsInf(b[iblast]) && ((b[b_iblast] > 0.0) == (b[iblast] > 0.0))) { guard5 = TRUE; } else { guard4 = TRUE; } } else { guard4 = TRUE; } if (guard5 == TRUE) { p = TRUE; } if (guard4 == TRUE) { p = FALSE; } if (p) { b_iblast++; } else { exitg1 = TRUE; } } iblast = b_iblast - 1; st.site = &mp_emlrtRSI; absxk = muDoubleScalarAbs(bk / 2.0); if ((!muDoubleScalarIsInf(absxk)) && (!muDoubleScalarIsNaN(absxk))) { if (absxk <= 2.2250738585072014E-308) { absxk = 4.94065645841247E-324; } else { frexp(absxk, &c_exponent); absxk = ldexp(1.0, c_exponent - 53); } } else { absxk = rtNaN; } guard2 = FALSE; guard3 = FALSE; if (muDoubleScalarAbs(bk - ak) < absxk) { guard3 = TRUE; } else if (muDoubleScalarIsInf(ak)) { if (muDoubleScalarIsInf(bk) && ((ak > 0.0) == (bk > 0.0))) { guard3 = TRUE; } else { guard2 = TRUE; } } else { guard2 = TRUE; } if (guard3 == TRUE) { p = TRUE; } if (guard2 == TRUE) { p = FALSE; } if (p) { st.site = &np_emlrtRSI; nc++; c_data[nc - 1] = ak; ia_data[nc - 1] = iafirst + 1; ib_data[nc - 1] = ibfirst + 1; st.site = &op_emlrtRSI; ialast = b_ialast; iafirst = b_ialast; st.site = &pp_emlrtRSI; iblast = b_iblast; ibfirst = b_iblast; } else { st.site = &qp_emlrtRSI; guard1 = FALSE; if (ak < bk) { guard1 = TRUE; } else if (muDoubleScalarIsNaN(bk)) { guard1 = TRUE; } else { p = FALSE; } if (guard1 == TRUE) { p = TRUE; } if (p) { st.site = &rp_emlrtRSI; ialast = b_ialast; iafirst = b_ialast; } else { st.site = &sp_emlrtRSI; iblast = b_iblast; ibfirst = b_iblast; } } } if (ncmax > 0) { if (nc <= ncmax) { } else { b_y = NULL; m20 = mxCreateString("Assertion failed."); emlrtAssign(&b_y, m20); st.site = &yt_emlrtRSI; b_error(&st, b_y, &y_emlrtMCI); } if (1 > nc) { ialast = 0; } else { ialast = nc; } for (iafirst = 0; iafirst < ialast; iafirst++) { b_ia_data[iafirst] = ia_data[iafirst]; } ia_size[0] = ialast; for (iafirst = 0; iafirst < ialast; iafirst++) { ia_data[iafirst] = b_ia_data[iafirst]; } } if (ncmax > 0) { if (nc <= ncmax) { } else { c_y = NULL; m20 = mxCreateString("Assertion failed."); emlrtAssign(&c_y, m20); st.site = &xt_emlrtRSI; b_error(&st, c_y, &ab_emlrtMCI); } if (1 > nc) { ialast = 0; } else { ialast = nc; } for (iafirst = 0; iafirst < ialast; iafirst++) { b_ia_data[iafirst] = ib_data[iafirst]; } ib_size[0] = ialast; for (iafirst = 0; iafirst < ialast; iafirst++) { ib_data[iafirst] = b_ia_data[iafirst]; } } if (ncmax > 0) { if (nc <= ncmax) { } else { d_y = NULL; m20 = mxCreateString("Assertion failed."); emlrtAssign(&d_y, m20); st.site = &wt_emlrtRSI; b_error(&st, d_y, &bb_emlrtMCI); } if (1 > nc) { ialast = 0; } else { ialast = nc; } for (iafirst = 0; iafirst < ialast; iafirst++) { b_c_data[iafirst] = c_data[iafirst]; } c_size[0] = ialast; for (iafirst = 0; iafirst < ialast; iafirst++) { c_data[iafirst] = b_c_data[iafirst]; } } }
/* Function Definitions */ boolean_T all(const emlrtStack *sp, const emxArray_boolean_T *x) { boolean_T y; boolean_T overflow; const mxArray *b_y; static const int32_T iv20[2] = { 1, 51 }; const mxArray *m7; char_T cv22[51]; int32_T i; static const char_T cv23[51] = { 'C', 'o', 'd', 'e', 'r', ':', 't', 'o', 'o', 'l', 'b', 'o', 'x', ':', 'e', 'm', 'l', '_', 'a', 'l', 'l', '_', 'o', 'r', '_', 'a', 'n', 'y', '_', 'a', 'u', 't', 'o', 'D', 'i', 'm', 'I', 'n', 'c', 'o', 'm', 'p', 'a', 't', 'i', 'b', 'i', 'l', 'i', 't', 'y' }; boolean_T exitg1; int32_T i66; emlrtStack st; emlrtStack b_st; emlrtStack c_st; st.prev = sp; st.tls = sp->tls; st.site = &ve_emlrtRSI; b_st.prev = &st; b_st.tls = st.tls; c_st.prev = &b_st; c_st.tls = b_st.tls; b_st.site = &we_emlrtRSI; if ((x->size[1] == 1) || (x->size[1] != 1)) { overflow = true; } else { overflow = false; } b_st.site = &xe_emlrtRSI; if (overflow) { } else { b_y = NULL; m7 = emlrtCreateCharArray(2, iv20); for (i = 0; i < 51; i++) { cv22[i] = cv23[i]; } emlrtInitCharArrayR2013a(&b_st, 51, m7, cv22); emlrtAssign(&b_y, m7); c_st.site = &dh_emlrtRSI; b_error(&c_st, message(&c_st, b_y, &n_emlrtMCI), &n_emlrtMCI); } y = true; b_st.site = &ye_emlrtRSI; if (1 > x->size[1]) { overflow = false; } else { overflow = (x->size[1] > 2147483646); } if (overflow) { c_st.site = &ic_emlrtRSI; check_forloop_overflow_error(&c_st); } i = 1; exitg1 = false; while ((!exitg1) && (i <= x->size[1])) { i66 = x->size[1]; if (x->data[emlrtDynamicBoundsCheckFastR2012b(i, 1, i66, &re_emlrtBCI, &st) - 1] == 0) { y = false; exitg1 = true; } else { i++; } } return y; }
void b_Acoeff(const emlrtStack *sp, real_T ksi, real_T j, const emxArray_real_T * x, real_T t, const emxArray_real_T *gridT, emxArray_real_T *vals) { emxArray_real_T *b; emxArray_real_T *r8; int32_T b_x; int32_T i; emxArray_boolean_T *b_t; real_T c_x; emxArray_boolean_T *c_t; emxArray_real_T *z0; emxArray_real_T *d_x; emxArray_real_T *e_x; emxArray_real_T *r9; int32_T b_b[2]; int32_T f_x[2]; emxArray_real_T *g_x; emxArray_real_T *r10; const mxArray *y; static const int32_T iv16[2] = { 1, 45 }; const mxArray *m6; char_T cv18[45]; static const char_T cv19[45] = { 'C', 'o', 'd', 'e', 'r', ':', 't', 'o', 'o', 'l', 'b', 'o', 'x', ':', 'm', 't', 'i', 'm', 'e', 's', '_', 'n', 'o', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'S', 'c', 'a', 'l', 'a', 'r', 'E', 'x', 'p', 'a', 'n', 's', 'i', 'o', 'n' }; const mxArray *b_y; static const int32_T iv17[2] = { 1, 21 }; char_T cv20[21]; static const char_T cv21[21] = { 'C', 'o', 'd', 'e', 'r', ':', 'M', 'A', 'T', 'L', 'A', 'B', ':', 'i', 'n', 'n', 'e', 'r', 'd', 'i', 'm' }; emxArray_boolean_T *d_t; real_T h_x; emxArray_boolean_T *e_t; emxArray_real_T *i_x; emxArray_real_T *r11; emxArray_real_T *j_x; emxArray_real_T *r12; emxArray_real_T *z1; int32_T b_z0[2]; emxArray_real_T *c_z0; emxArray_real_T *k_x; const mxArray *c_y; static const int32_T iv18[2] = { 1, 45 }; const mxArray *d_y; static const int32_T iv19[2] = { 1, 21 }; emlrtStack st; emlrtStack b_st; emlrtStack c_st; emlrtStack d_st; st.prev = sp; st.tls = sp->tls; b_st.prev = &st; b_st.tls = st.tls; c_st.prev = &b_st; c_st.tls = b_st.tls; d_st.prev = &b_st; d_st.tls = b_st.tls; emlrtHeapReferenceStackEnterFcnR2012b(sp); emxInit_real_T(sp, &b, 2, &bb_emlrtRTEI, true); emxInit_real_T(sp, &r8, 2, &bb_emlrtRTEI, true); /* evaluate the coefficient A at the boundary ksi=0 or ksi=1; */ /* for the index j which describes the time steps timePoints_j, at time t and space */ /* point x */ /* timePoints is a vector describing the time descritized domain */ b_x = gridT->size[1]; i = (int32_T)emlrtIntegerCheckFastR2012b(j, &emlrtDCI, sp); if (t <= gridT->data[emlrtDynamicBoundsCheckFastR2012b(i, 1, b_x, &d_emlrtBCI, sp) - 1]) { b_x = vals->size[0] * vals->size[1]; vals->size[0] = 1; vals->size[1] = 1; emxEnsureCapacity(sp, (emxArray__common *)vals, b_x, (int32_T)sizeof(real_T), &bb_emlrtRTEI); vals->data[0] = 0.0; } else { emxInit_boolean_T(sp, &b_t, 2, &bb_emlrtRTEI, true); b_x = b_t->size[0] * b_t->size[1]; b_t->size[0] = 1; b_t->size[1] = 2 + x->size[1]; emxEnsureCapacity(sp, (emxArray__common *)b_t, b_x, (int32_T)sizeof (boolean_T), &bb_emlrtRTEI); b_x = gridT->size[1]; i = (int32_T)j; b_t->data[0] = (t > gridT->data[emlrtDynamicBoundsCheckFastR2012b(i, 1, b_x, &e_emlrtBCI, sp) - 1]); b_x = gridT->size[1]; i = (int32_T)((uint32_T)j + 1U); b_t->data[b_t->size[0]] = (t <= gridT-> data[emlrtDynamicBoundsCheckFastR2012b(i, 1, b_x, &f_emlrtBCI, sp) - 1]); i = x->size[1]; for (b_x = 0; b_x < i; b_x++) { b_t->data[b_t->size[0] * (b_x + 2)] = (x->data[x->size[0] * b_x] == ksi); } st.site = &pe_emlrtRSI; if (all(&st, b_t)) { b_x = gridT->size[1]; i = (int32_T)j; emlrtDynamicBoundsCheckFastR2012b(i, 1, b_x, &c_emlrtBCI, sp); c_x = (t - gridT->data[(int32_T)j - 1]) / 3.1415926535897931; st.site = &emlrtRSI; if (c_x < 0.0) { b_st.site = &f_emlrtRSI; eml_error(&b_st); } b_x = vals->size[0] * vals->size[1]; vals->size[0] = 1; vals->size[1] = 1; emxEnsureCapacity(sp, (emxArray__common *)vals, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); vals->data[0] = muDoubleScalarSqrt(c_x); } else { emxInit_boolean_T(sp, &c_t, 2, &bb_emlrtRTEI, true); b_x = c_t->size[0] * c_t->size[1]; c_t->size[0] = 1; c_t->size[1] = 2 + x->size[1]; emxEnsureCapacity(sp, (emxArray__common *)c_t, b_x, (int32_T)sizeof (boolean_T), &bb_emlrtRTEI); b_x = gridT->size[1]; i = (int32_T)j; c_t->data[0] = (t > gridT->data[emlrtDynamicBoundsCheckFastR2012b(i, 1, b_x, &g_emlrtBCI, sp) - 1]); b_x = gridT->size[1]; i = (int32_T)((uint32_T)j + 1U); c_t->data[c_t->size[0]] = (t <= gridT-> data[emlrtDynamicBoundsCheckFastR2012b(i, 1, b_x, &h_emlrtBCI, sp) - 1]); i = x->size[1]; for (b_x = 0; b_x < i; b_x++) { c_t->data[c_t->size[0] * (b_x + 2)] = (x->data[x->size[0] * b_x] != ksi); } emxInit_real_T(sp, &z0, 2, &cb_emlrtRTEI, true); emxInit_real_T(sp, &d_x, 2, &bb_emlrtRTEI, true); st.site = &qe_emlrtRSI; if (all(&st, c_t)) { st.site = &b_emlrtRSI; b_x = gridT->size[1]; i = (int32_T)j; c_x = t - gridT->data[emlrtDynamicBoundsCheckFastR2012b(i, 1, b_x, &m_emlrtBCI, &st) - 1]; if (c_x < 0.0) { b_st.site = &f_emlrtRSI; eml_error(&b_st); } emxInit_real_T(&st, &e_x, 2, &bb_emlrtRTEI, true); b_x = e_x->size[0] * e_x->size[1]; e_x->size[0] = 1; e_x->size[1] = x->size[1]; emxEnsureCapacity(sp, (emxArray__common *)e_x, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = x->size[0] * x->size[1]; for (b_x = 0; b_x < i; b_x++) { e_x->data[b_x] = x->data[b_x] - ksi; } emxInit_real_T(sp, &r9, 2, &bb_emlrtRTEI, true); b_abs(sp, e_x, r9); b_x = r8->size[0] * r8->size[1]; r8->size[0] = 1; r8->size[1] = r9->size[1]; emxEnsureCapacity(sp, (emxArray__common *)r8, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = r9->size[0] * r9->size[1]; emxFree_real_T(&e_x); for (b_x = 0; b_x < i; b_x++) { r8->data[b_x] = r9->data[b_x]; } emxFree_real_T(&r9); rdivide(sp, r8, 2.0 * muDoubleScalarSqrt(c_x), z0); st.site = &re_emlrtRSI; mpower(&st, z0, d_x); b_x = d_x->size[0] * d_x->size[1]; d_x->size[0] = 1; emxEnsureCapacity(sp, (emxArray__common *)d_x, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = d_x->size[0]; b_x = d_x->size[1]; i *= b_x; for (b_x = 0; b_x < i; b_x++) { d_x->data[b_x] = -d_x->data[b_x]; } b_x = b->size[0] * b->size[1]; b->size[0] = 1; b->size[1] = d_x->size[1]; emxEnsureCapacity(sp, (emxArray__common *)b, b_x, (int32_T)sizeof(real_T), &bb_emlrtRTEI); i = d_x->size[0] * d_x->size[1]; for (b_x = 0; b_x < i; b_x++) { b->data[b_x] = d_x->data[b_x]; } for (i = 0; i < d_x->size[1]; i++) { b->data[i] = muDoubleScalarExp(b->data[i]); } st.site = &re_emlrtRSI; b_mrdivide(&st, b, z0); for (b_x = 0; b_x < 2; b_x++) { i = d_x->size[0] * d_x->size[1]; d_x->size[b_x] = z0->size[b_x]; emxEnsureCapacity(sp, (emxArray__common *)d_x, i, (int32_T)sizeof (real_T), &ab_emlrtRTEI); } for (i = 0; i < z0->size[1]; i++) { d_x->data[i] = scalar_erf(z0->data[i]); } b_x = d_x->size[0] * d_x->size[1]; d_x->size[0] = 1; emxEnsureCapacity(sp, (emxArray__common *)d_x, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = d_x->size[0]; b_x = d_x->size[1]; i *= b_x; for (b_x = 0; b_x < i; b_x++) { d_x->data[b_x] *= 1.7724538509055159; } for (b_x = 0; b_x < 2; b_x++) { b_b[b_x] = b->size[b_x]; } for (b_x = 0; b_x < 2; b_x++) { f_x[b_x] = d_x->size[b_x]; } emxInit_real_T(sp, &g_x, 2, &bb_emlrtRTEI, true); emlrtSizeEqCheck2DFastR2012b(b_b, f_x, &o_emlrtECI, sp); b_x = g_x->size[0] * g_x->size[1]; g_x->size[0] = 1; g_x->size[1] = x->size[1]; emxEnsureCapacity(sp, (emxArray__common *)g_x, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = x->size[0] * x->size[1]; for (b_x = 0; b_x < i; b_x++) { g_x->data[b_x] = x->data[b_x] - ksi; } emxInit_real_T(sp, &r10, 2, &bb_emlrtRTEI, true); b_abs(sp, g_x, r10); b_x = r8->size[0] * r8->size[1]; r8->size[0] = 1; r8->size[1] = r10->size[1]; emxEnsureCapacity(sp, (emxArray__common *)r8, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = r10->size[0] * r10->size[1]; emxFree_real_T(&g_x); for (b_x = 0; b_x < i; b_x++) { r8->data[b_x] = r10->data[b_x]; } emxFree_real_T(&r10); rdivide(sp, r8, 3.5449077018110318, vals); st.site = &re_emlrtRSI; b_x = b->size[0] * b->size[1]; b->size[0] = 1; emxEnsureCapacity(&st, (emxArray__common *)b, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = b->size[0]; b_x = b->size[1]; i *= b_x; for (b_x = 0; b_x < i; b_x++) { b->data[b_x] -= d_x->data[b_x]; } b_st.site = &he_emlrtRSI; if (!(vals->size[1] == 1)) { if ((vals->size[1] == 1) || (b->size[1] == 1)) { y = NULL; m6 = emlrtCreateCharArray(2, iv16); for (i = 0; i < 45; i++) { cv18[i] = cv19[i]; } emlrtInitCharArrayR2013a(&b_st, 45, m6, cv18); emlrtAssign(&y, m6); c_st.site = &fh_emlrtRSI; d_st.site = &vg_emlrtRSI; b_error(&c_st, message(&d_st, y, &j_emlrtMCI), &k_emlrtMCI); } else { b_y = NULL; m6 = emlrtCreateCharArray(2, iv17); for (i = 0; i < 21; i++) { cv20[i] = cv21[i]; } emlrtInitCharArrayR2013a(&b_st, 21, m6, cv20); emlrtAssign(&b_y, m6); c_st.site = &gh_emlrtRSI; d_st.site = &wg_emlrtRSI; b_error(&c_st, message(&d_st, b_y, &l_emlrtMCI), &m_emlrtMCI); } } c_x = vals->data[0]; b_x = vals->size[0] * vals->size[1]; vals->size[0] = 1; vals->size[1] = b->size[1]; emxEnsureCapacity(&st, (emxArray__common *)vals, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = b->size[1]; for (b_x = 0; b_x < i; b_x++) { vals->data[vals->size[0] * b_x] = c_x * b->data[b->size[0] * b_x]; } } else { emxInit_boolean_T(sp, &d_t, 2, &bb_emlrtRTEI, true); b_x = d_t->size[0] * d_t->size[1]; d_t->size[0] = 1; d_t->size[1] = 1 + x->size[1]; emxEnsureCapacity(sp, (emxArray__common *)d_t, b_x, (int32_T)sizeof (boolean_T), &bb_emlrtRTEI); b_x = gridT->size[1]; i = (int32_T)((uint32_T)j + 1U); d_t->data[0] = (t > gridT->data[emlrtDynamicBoundsCheckFastR2012b(i, 1, b_x, &i_emlrtBCI, sp) - 1]); i = x->size[1]; for (b_x = 0; b_x < i; b_x++) { d_t->data[d_t->size[0] * (b_x + 1)] = (x->data[x->size[0] * b_x] == ksi); } st.site = &se_emlrtRSI; if (all(&st, d_t)) { b_x = gridT->size[1]; i = (int32_T)j; emlrtDynamicBoundsCheckFastR2012b(i, 1, b_x, &b_emlrtBCI, sp); c_x = (t - gridT->data[(int32_T)j - 1]) / 3.1415926535897931; b_x = gridT->size[1]; i = (int32_T)(j + 1.0); emlrtDynamicBoundsCheckFastR2012b(i, 1, b_x, &emlrtBCI, sp); h_x = (t - gridT->data[(int32_T)(j + 1.0) - 1]) / 3.1415926535897931; st.site = &c_emlrtRSI; if (c_x < 0.0) { b_st.site = &f_emlrtRSI; eml_error(&b_st); } st.site = &c_emlrtRSI; if (h_x < 0.0) { b_st.site = &f_emlrtRSI; eml_error(&b_st); } b_x = vals->size[0] * vals->size[1]; vals->size[0] = 1; vals->size[1] = 1; emxEnsureCapacity(sp, (emxArray__common *)vals, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); vals->data[0] = muDoubleScalarSqrt(c_x) - muDoubleScalarSqrt(h_x); } else { emxInit_boolean_T(sp, &e_t, 2, &bb_emlrtRTEI, true); b_x = e_t->size[0] * e_t->size[1]; e_t->size[0] = 1; e_t->size[1] = 1 + x->size[1]; emxEnsureCapacity(sp, (emxArray__common *)e_t, b_x, (int32_T)sizeof (boolean_T), &bb_emlrtRTEI); b_x = gridT->size[1]; i = (int32_T)((uint32_T)j + 1U); e_t->data[0] = (t > gridT->data[emlrtDynamicBoundsCheckFastR2012b(i, 1, b_x, &j_emlrtBCI, sp) - 1]); i = x->size[1]; for (b_x = 0; b_x < i; b_x++) { e_t->data[e_t->size[0] * (b_x + 1)] = (x->data[x->size[0] * b_x] != ksi); } st.site = &te_emlrtRSI; if (all(&st, e_t)) { st.site = &d_emlrtRSI; b_x = gridT->size[1]; i = (int32_T)j; c_x = t - gridT->data[emlrtDynamicBoundsCheckFastR2012b(i, 1, b_x, &k_emlrtBCI, &st) - 1]; if (c_x < 0.0) { b_st.site = &f_emlrtRSI; eml_error(&b_st); } emxInit_real_T(&st, &i_x, 2, &bb_emlrtRTEI, true); b_x = i_x->size[0] * i_x->size[1]; i_x->size[0] = 1; i_x->size[1] = x->size[1]; emxEnsureCapacity(sp, (emxArray__common *)i_x, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = x->size[0] * x->size[1]; for (b_x = 0; b_x < i; b_x++) { i_x->data[b_x] = x->data[b_x] - ksi; } emxInit_real_T(sp, &r11, 2, &bb_emlrtRTEI, true); b_abs(sp, i_x, r11); b_x = r8->size[0] * r8->size[1]; r8->size[0] = 1; r8->size[1] = r11->size[1]; emxEnsureCapacity(sp, (emxArray__common *)r8, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = r11->size[0] * r11->size[1]; emxFree_real_T(&i_x); for (b_x = 0; b_x < i; b_x++) { r8->data[b_x] = r11->data[b_x]; } emxFree_real_T(&r11); rdivide(sp, r8, 2.0 * muDoubleScalarSqrt(c_x), z0); st.site = &e_emlrtRSI; b_x = gridT->size[1]; i = (int32_T)((uint32_T)j + 1U); c_x = t - gridT->data[emlrtDynamicBoundsCheckFastR2012b(i, 1, b_x, &l_emlrtBCI, &st) - 1]; if (c_x < 0.0) { b_st.site = &f_emlrtRSI; eml_error(&b_st); } emxInit_real_T(&st, &j_x, 2, &bb_emlrtRTEI, true); b_x = j_x->size[0] * j_x->size[1]; j_x->size[0] = 1; j_x->size[1] = x->size[1]; emxEnsureCapacity(sp, (emxArray__common *)j_x, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = x->size[0] * x->size[1]; for (b_x = 0; b_x < i; b_x++) { j_x->data[b_x] = x->data[b_x] - ksi; } emxInit_real_T(sp, &r12, 2, &bb_emlrtRTEI, true); b_abs(sp, j_x, r12); b_x = r8->size[0] * r8->size[1]; r8->size[0] = 1; r8->size[1] = r12->size[1]; emxEnsureCapacity(sp, (emxArray__common *)r8, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = r12->size[0] * r12->size[1]; emxFree_real_T(&j_x); for (b_x = 0; b_x < i; b_x++) { r8->data[b_x] = r12->data[b_x]; } emxFree_real_T(&r12); emxInit_real_T(sp, &z1, 2, &db_emlrtRTEI, true); rdivide(sp, r8, 2.0 * muDoubleScalarSqrt(c_x), z1); st.site = &ue_emlrtRSI; mpower(&st, z0, d_x); b_x = d_x->size[0] * d_x->size[1]; d_x->size[0] = 1; emxEnsureCapacity(sp, (emxArray__common *)d_x, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = d_x->size[0]; b_x = d_x->size[1]; i *= b_x; for (b_x = 0; b_x < i; b_x++) { d_x->data[b_x] = -d_x->data[b_x]; } b_x = b->size[0] * b->size[1]; b->size[0] = 1; b->size[1] = d_x->size[1]; emxEnsureCapacity(sp, (emxArray__common *)b, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = d_x->size[0] * d_x->size[1]; for (b_x = 0; b_x < i; b_x++) { b->data[b_x] = d_x->data[b_x]; } for (i = 0; i < d_x->size[1]; i++) { b->data[i] = muDoubleScalarExp(b->data[i]); } st.site = &ue_emlrtRSI; b_mrdivide(&st, b, z0); st.site = &ue_emlrtRSI; mpower(&st, z1, d_x); b_x = d_x->size[0] * d_x->size[1]; d_x->size[0] = 1; emxEnsureCapacity(sp, (emxArray__common *)d_x, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = d_x->size[0]; b_x = d_x->size[1]; i *= b_x; for (b_x = 0; b_x < i; b_x++) { d_x->data[b_x] = -d_x->data[b_x]; } b_x = r8->size[0] * r8->size[1]; r8->size[0] = 1; r8->size[1] = d_x->size[1]; emxEnsureCapacity(sp, (emxArray__common *)r8, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = d_x->size[0] * d_x->size[1]; for (b_x = 0; b_x < i; b_x++) { r8->data[b_x] = d_x->data[b_x]; } for (i = 0; i < d_x->size[1]; i++) { r8->data[i] = muDoubleScalarExp(r8->data[i]); } st.site = &ue_emlrtRSI; b_mrdivide(&st, r8, z1); for (b_x = 0; b_x < 2; b_x++) { b_b[b_x] = b->size[b_x]; } for (b_x = 0; b_x < 2; b_x++) { b_z0[b_x] = r8->size[b_x]; } emxInit_real_T(sp, &c_z0, 2, &bb_emlrtRTEI, true); emlrtSizeEqCheck2DFastR2012b(b_b, b_z0, &m_emlrtECI, sp); b_x = c_z0->size[0] * c_z0->size[1]; c_z0->size[0] = 1; c_z0->size[1] = z0->size[1]; emxEnsureCapacity(sp, (emxArray__common *)c_z0, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = z0->size[0] * z0->size[1]; for (b_x = 0; b_x < i; b_x++) { c_z0->data[b_x] = z0->data[b_x]; } b_erf(sp, c_z0, z0); b_erf(sp, z1, d_x); emxFree_real_T(&c_z0); emxFree_real_T(&z1); for (b_x = 0; b_x < 2; b_x++) { b_z0[b_x] = z0->size[b_x]; } for (b_x = 0; b_x < 2; b_x++) { f_x[b_x] = d_x->size[b_x]; } emlrtSizeEqCheck2DFastR2012b(b_z0, f_x, &n_emlrtECI, sp); b_x = z0->size[0] * z0->size[1]; z0->size[0] = 1; emxEnsureCapacity(sp, (emxArray__common *)z0, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = z0->size[0]; b_x = z0->size[1]; i *= b_x; for (b_x = 0; b_x < i; b_x++) { z0->data[b_x] = 1.7724538509055159 * (z0->data[b_x] - d_x-> data[b_x]); } for (b_x = 0; b_x < 2; b_x++) { b_b[b_x] = b->size[b_x]; } for (b_x = 0; b_x < 2; b_x++) { b_z0[b_x] = z0->size[b_x]; } emxInit_real_T(sp, &k_x, 2, &bb_emlrtRTEI, true); emlrtSizeEqCheck2DFastR2012b(b_b, b_z0, &m_emlrtECI, sp); b_x = k_x->size[0] * k_x->size[1]; k_x->size[0] = 1; k_x->size[1] = x->size[1]; emxEnsureCapacity(sp, (emxArray__common *)k_x, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = x->size[0] * x->size[1]; for (b_x = 0; b_x < i; b_x++) { k_x->data[b_x] = x->data[b_x] - ksi; } b_abs(sp, k_x, d_x); rdivide(sp, d_x, 3.5449077018110318, vals); st.site = &ue_emlrtRSI; b_x = b->size[0] * b->size[1]; b->size[0] = 1; emxEnsureCapacity(&st, (emxArray__common *)b, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); i = b->size[0]; b_x = b->size[1]; i *= b_x; emxFree_real_T(&k_x); for (b_x = 0; b_x < i; b_x++) { b->data[b_x] = (b->data[b_x] - r8->data[b_x]) + z0->data[b_x]; } b_st.site = &he_emlrtRSI; if (!(vals->size[1] == 1)) { if ((vals->size[1] == 1) || (b->size[1] == 1)) { c_y = NULL; m6 = emlrtCreateCharArray(2, iv18); for (i = 0; i < 45; i++) { cv18[i] = cv19[i]; } emlrtInitCharArrayR2013a(&b_st, 45, m6, cv18); emlrtAssign(&c_y, m6); c_st.site = &fh_emlrtRSI; d_st.site = &vg_emlrtRSI; b_error(&c_st, message(&d_st, c_y, &j_emlrtMCI), &k_emlrtMCI); } else { d_y = NULL; m6 = emlrtCreateCharArray(2, iv19); for (i = 0; i < 21; i++) { cv20[i] = cv21[i]; } emlrtInitCharArrayR2013a(&b_st, 21, m6, cv20); emlrtAssign(&d_y, m6); c_st.site = &gh_emlrtRSI; d_st.site = &wg_emlrtRSI; b_error(&c_st, message(&d_st, d_y, &l_emlrtMCI), &m_emlrtMCI); } } c_x = vals->data[0]; b_x = vals->size[0] * vals->size[1]; vals->size[0] = 1; vals->size[1] = b->size[1]; emxEnsureCapacity(&st, (emxArray__common *)vals, b_x, (int32_T) sizeof(real_T), &bb_emlrtRTEI); i = b->size[1]; for (b_x = 0; b_x < i; b_x++) { vals->data[vals->size[0] * b_x] = c_x * b->data[b->size[0] * b_x]; } } else { b_x = vals->size[0] * vals->size[1]; vals->size[0] = 1; vals->size[1] = 1; emxEnsureCapacity(sp, (emxArray__common *)vals, b_x, (int32_T)sizeof (real_T), &bb_emlrtRTEI); vals->data[0] = 0.0; } emxFree_boolean_T(&e_t); } emxFree_boolean_T(&d_t); } emxFree_boolean_T(&c_t); emxFree_real_T(&d_x); emxFree_real_T(&z0); } emxFree_boolean_T(&b_t); } emxFree_real_T(&r8); emxFree_real_T(&b); emlrtHeapReferenceStackLeaveFcnR2012b(sp); }
void SDRuReceiver_setupImplLocal(const emlrtStack *sp, comm_SDRuReceiver *obj, UsrpErrorCapiEnumT *deviceStatus, char_T errMsg_data[1024], int32_T errMsg_size[2]) { BoardIdCapiEnumT boardId; uint8_T requester[15]; int32_T i; const mxArray *y; static const int32_T iv100[2] = { 1, 6 }; const mxArray *m15; char_T cv111[6]; static const char_T cv112[6] = { 's', 'i', 'l', 'e', 'n', 't' }; static const uint8_T addr_null[13] = { 49U, 57U, 50U, 46U, 49U, 54U, 56U, 46U, 49U, 48U, 46U, 50U, 0U }; char * addr_c; uint8_T req_null[16]; char * req_c; int32_T driverApiH; const mxArray *b_y; int32_T loop_ub; char_T b_errMsg_data[1024]; comm_SDRuReceiver *b_obj; emlrtStack st; emlrtStack b_st; emlrtStack c_st; st.prev = sp; st.tls = sp->tls; b_st.prev = &st; b_st.tls = st.tls; c_st.prev = &b_st; c_st.tls = b_st.tls; st.site = &nl_emlrtRSI; boardId = obj->pSubDevice; for (i = 0; i < 15; i++) { requester[i] = (uint8_T)obj->ObjectID[i]; } /* Copyright 2011-2012 The MathWorks, Inc. */ b_st.site = &tl_emlrtRSI; /* */ /* This function unifies handling of interp vs. codegen call as well as */ /* errStat / errStr assignment. */ /* */ /* Copyright 2011-2013 The MathWorks, Inc. */ if (!isSetupsdruCalled) { y = NULL; m15 = mxCreateCharArray(2, iv100); for (i = 0; i < 6; i++) { cv111[i] = cv112[i]; } emlrtInitCharArrayR2013a(&b_st, 6, m15, cv111); emlrtAssign(&y, m15); c_st.site = &gr_emlrtRSI; setupsdru(&c_st, sdruroot(&c_st, &o_emlrtMCI), y, &p_emlrtMCI); isSetupsdruCalled = TRUE; } /* These sizes must match those in C code. */ /* Arbitrary max imposed on ML/SL side */ /* function is being called in interpreted mode */ /* not being found: */ /* eml_allow_enum_inputs; */ /* errStat_i = int32(0); */ for (i = 0; i < 1024; i++) { errMsg_data[i] = '\x00'; } /* varargin 1 2 3 4 5 6 7 */ /* addr, boardId, requester, frameLength, dportType, buffMode, buffSize */ /* varargout 1 2 3 */ /* driverH, errStat, errMsg */ addr_c = (char *)(addr_null); for (i = 0; i < 15; i++) { req_null[i] = requester[i]; } req_null[15] = 0; req_c = (char *)(req_null); openDataConnection_c(addr_c, boardId, req_c, 5120U, DPortDTypeCInt16, FALSE, 0U, &driverApiH, deviceStatus, &errMsg_data[0]); /* Tell coder that addr_null & req_null must be alive and separate throughout the call to cmd_c. */ (void)(addr_null); (void)(req_null); /* errStat = UsrpErrorCapiEnumT(errStat_i); */ i = strlen(&errMsg_data[0]); if (i <= 1024) { } else { b_y = NULL; m15 = mxCreateString("Assertion failed."); emlrtAssign(&b_y, m15); c_st.site = &xq_emlrtRSI; b_error(&c_st, b_y, &n_emlrtMCI); } if (1 > i) { loop_ub = 0; } else { loop_ub = emlrtDynamicBoundsCheckFastR2012b(i, 1, 1024, &o_emlrtBCI, &b_st); } for (i = 0; i < loop_ub; i++) { b_errMsg_data[i] = errMsg_data[i]; } errMsg_size[0] = 1; errMsg_size[1] = loop_ub; for (i = 0; i < loop_ub; i++) { errMsg_data[i] = b_errMsg_data[i]; } st.site = &nl_emlrtRSI; b_obj = obj; b_obj->pDriverHandle = driverApiH; b_st.site = &fb_emlrtRSI; st.site = &nl_emlrtRSI; b_st.site = &fb_emlrtRSI; }
/* Function Definitions */ void checkIPAddressFormat(void) { int32_T idx; int8_T ii_data[12]; int32_T ii; boolean_T exitg5; boolean_T guard1 = FALSE; static const boolean_T bv0[12] = { FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, TRUE, FALSE }; int32_T loop_ub; int32_T tmp_data[12]; int32_T i7; int8_T b_ii_data[12]; int32_T i8; int8_T dotIndices_data[12]; const mxArray *y; static const int32_T iv67[2] = { 1, 42 }; const mxArray *m14; char_T cv79[42]; static const char_T cv80[42] = { 's', 'd', 'r', 'u', ':', 'c', 'h', 'e', 'c', 'k', 'I', 'P', 'A', 'd', 'd', 'r', 'e', 's', 's', 'F', 'o', 'r', 'm', 'a', 't', ':', 'I', 'n', 'v', 'a', 'l', 'i', 'd', 'I', 'P', 'A', 'd', 'd', 'r', 'e', 's', 's' }; const mxArray *b_y; static const int32_T iv68[2] = { 1, 9 }; char_T cv81[9]; static const char_T cv82[9] = { 'I', 'P', 'A', 'd', 'd', 'r', 'e', 's', 's' }; int32_T i9; int32_T i10; int32_T i11; int32_T i12; int32_T b_tmp_data[11]; static const char_T cv83[12] = { '1', '9', '2', '.', '1', '6', '8', '.', '1', '0', '.', '2' }; int8_T x_data[12]; boolean_T guard4 = FALSE; int32_T x_size[2]; boolean_T b_x_data[12]; int32_T tmp_size[2]; int32_T x[2]; int32_T iv69[2]; boolean_T cond; boolean_T exitg4; const mxArray *c_y; static const int32_T iv70[2] = { 1, 42 }; const mxArray *d_y; static const int32_T iv71[2] = { 1, 9 }; boolean_T guard3 = FALSE; boolean_T exitg3; const mxArray *e_y; static const int32_T iv72[2] = { 1, 42 }; const mxArray *f_y; static const int32_T iv73[2] = { 1, 9 }; boolean_T guard2 = FALSE; boolean_T exitg2; const mxArray *g_y; static const int32_T iv74[2] = { 1, 42 }; const mxArray *h_y; static const int32_T iv75[2] = { 1, 9 }; boolean_T b_guard1 = FALSE; boolean_T exitg1; const mxArray *i_y; static const int32_T iv76[2] = { 1, 42 }; const mxArray *j_y; static const int32_T iv77[2] = { 1, 9 }; /* checkIPAddressFormat IP address format checker */ /* */ /* Warning: This function is an internal MathWorks function and may be removed */ /* in a future release. */ /* */ /* checkIPAddressFormat(ADDRS, NAME) returns true if the ADDRS is a valid */ /* dotted quad IP address. Otherwise, it errors out and prompts that variable */ /* NAME is not a valid IP address. */ /* */ /* % Example: */ /* % Check if the string '192.168.10.a' is a valid IP address for variable */ /* % IPAddress */ /* checkIPAddressFormat('192.168.10.a', 'IPAddress') */ /* Copyright 2012 The MathWorks, Inc. */ /* Look for three dots */ idx = 0; ii = 1; exitg5 = FALSE; while ((exitg5 == FALSE) && (ii < 13)) { guard1 = FALSE; if (bv0[ii - 1]) { idx++; ii_data[idx - 1] = (int8_T)ii; if (idx >= 12) { exitg5 = TRUE; } else { guard1 = TRUE; } } else { guard1 = TRUE; } if (guard1 == TRUE) { ii++; } } if (1 > idx) { loop_ub = 0; } else { loop_ub = idx; } for (i7 = 0; i7 < loop_ub; i7++) { tmp_data[i7] = 1 + i7; } for (i7 = 0; i7 < loop_ub; i7++) { i8 = 0; while (i8 <= 0) { b_ii_data[i7] = ii_data[tmp_data[i7] - 1]; i8 = 1; } } for (i7 = 0; i7 < loop_ub; i7++) { ii_data[i7] = b_ii_data[i7]; } for (i7 = 0; i7 < loop_ub; i7++) { dotIndices_data[i7] = ii_data[i7]; } /* Used instead of findstr since */ /* findstr does not generate code */ emlrtPushRtStackR2012b(&be_emlrtRSI, emlrtRootTLSGlobal); if (!(loop_ub != 3)) { } else { emlrtPushRtStackR2012b(&sc_emlrtRSI, emlrtRootTLSGlobal); y = NULL; m14 = mxCreateCharArray(2, iv67); for (idx = 0; idx < 42; idx++) { cv79[idx] = cv80[idx]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 42, m14, cv79); emlrtAssign(&y, m14); b_y = NULL; m14 = mxCreateCharArray(2, iv68); for (idx = 0; idx < 9; idx++) { cv81[idx] = cv82[idx]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 9, m14, cv81); emlrtAssign(&b_y, m14); b_error(message(y, b_y, &h_emlrtMCI), &h_emlrtMCI); emlrtPopRtStackR2012b(&sc_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&be_emlrtRSI, emlrtRootTLSGlobal); /* Check if all the elements other than the dots are numbers */ emlrtDynamicBoundsCheckFastR2012b(1, 1, loop_ub, &n_emlrtBCI, emlrtRootTLSGlobal); if (1 > dotIndices_data[0] - 1) { ii = 0; } else { i7 = dotIndices_data[0] - 1; ii = emlrtDynamicBoundsCheckFastR2012b(i7, 1, 12, &m_emlrtBCI, emlrtRootTLSGlobal); } emlrtDynamicBoundsCheckFastR2012b(1, 1, loop_ub, &l_emlrtBCI, emlrtRootTLSGlobal); emlrtDynamicBoundsCheckFastR2012b(2, 1, loop_ub, &k_emlrtBCI, emlrtRootTLSGlobal); if (dotIndices_data[0] + 1 > dotIndices_data[1] - 1) { i7 = 1; i8 = 0; } else { i7 = dotIndices_data[0] + 1; i7 = emlrtDynamicBoundsCheckFastR2012b(i7, 1, 12, &j_emlrtBCI, emlrtRootTLSGlobal); i8 = dotIndices_data[1] - 1; i8 = emlrtDynamicBoundsCheckFastR2012b(i8, 1, 12, &j_emlrtBCI, emlrtRootTLSGlobal); } emlrtDynamicBoundsCheckFastR2012b(2, 1, loop_ub, &i_emlrtBCI, emlrtRootTLSGlobal); emlrtDynamicBoundsCheckFastR2012b(3, 1, loop_ub, &h_emlrtBCI, emlrtRootTLSGlobal); if (dotIndices_data[1] + 1 > dotIndices_data[2] - 1) { i9 = 1; i10 = 0; } else { i9 = dotIndices_data[1] + 1; i9 = emlrtDynamicBoundsCheckFastR2012b(i9, 1, 12, &g_emlrtBCI, emlrtRootTLSGlobal); i10 = dotIndices_data[2] - 1; i10 = emlrtDynamicBoundsCheckFastR2012b(i10, 1, 12, &g_emlrtBCI, emlrtRootTLSGlobal); } emlrtDynamicBoundsCheckFastR2012b(3, 1, loop_ub, &f_emlrtBCI, emlrtRootTLSGlobal); if (dotIndices_data[2] + 1 > 12) { i11 = 1; i12 = 1; } else { i11 = dotIndices_data[2] + 1; i11 = emlrtDynamicBoundsCheckFastR2012b(i11, 1, 12, &e_emlrtBCI, emlrtRootTLSGlobal); i12 = 13; } emlrtPushRtStackR2012b(&ce_emlrtRSI, emlrtRootTLSGlobal); for (idx = 0; idx < ii; idx++) { b_tmp_data[idx] = 1 + idx; } for (idx = 0; idx < ii; idx++) { x_data[idx] = cv83[b_tmp_data[idx] - 1]; } guard4 = FALSE; if (ii == 0) { guard4 = TRUE; } else { x_size[0] = 1; x_size[1] = ii; for (idx = 0; idx < ii; idx++) { b_x_data[idx] = (x_data[idx] >= 48); } tmp_size[0] = 1; tmp_size[1] = ii; for (idx = 0; idx < 2; idx++) { x[idx] = x_size[idx]; iv69[idx] = tmp_size[idx]; } emlrtSizeEqCheck2DFastR2012b(x, iv69, &b_emlrtECI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ge_emlrtRSI, emlrtRootTLSGlobal); for (idx = 0; idx < ii; idx++) { b_x_data[idx] = !b_x_data[idx]; } emlrtPushRtStackR2012b(&ie_emlrtRSI, emlrtRootTLSGlobal); cond = FALSE; emlrtPushRtStackR2012b(&le_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&le_emlrtRSI, emlrtRootTLSGlobal); idx = 1; exitg4 = FALSE; while ((exitg4 == FALSE) && (idx <= ii)) { if (!(b_x_data[idx - 1] == 0)) { cond = TRUE; exitg4 = TRUE; } else { idx++; } } emlrtPopRtStackR2012b(&ie_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&ge_emlrtRSI, emlrtRootTLSGlobal); if (cond) { guard4 = TRUE; } else { cond = FALSE; } } if (guard4 == TRUE) { cond = TRUE; } emlrtPushRtStackR2012b(&he_emlrtRSI, emlrtRootTLSGlobal); if (!cond) { } else { emlrtPushRtStackR2012b(&sc_emlrtRSI, emlrtRootTLSGlobal); c_y = NULL; m14 = mxCreateCharArray(2, iv70); for (idx = 0; idx < 42; idx++) { cv79[idx] = cv80[idx]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 42, m14, cv79); emlrtAssign(&c_y, m14); d_y = NULL; m14 = mxCreateCharArray(2, iv71); for (idx = 0; idx < 9; idx++) { cv81[idx] = cv82[idx]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 9, m14, cv81); emlrtAssign(&d_y, m14); b_error(message(c_y, d_y, &h_emlrtMCI), &h_emlrtMCI); emlrtPopRtStackR2012b(&sc_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&he_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&ce_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&de_emlrtRSI, emlrtRootTLSGlobal); ii = (i8 - i7) + 1; loop_ub = i8 - i7; for (i8 = 0; i8 <= loop_ub; i8++) { b_tmp_data[i8] = i7 + i8; } for (i7 = 0; i7 < ii; i7++) { x_data[i7] = cv83[b_tmp_data[i7] - 1]; } guard3 = FALSE; if (ii == 0) { guard3 = TRUE; } else { x_size[0] = 1; x_size[1] = ii; for (i7 = 0; i7 < ii; i7++) { b_x_data[i7] = (x_data[i7] >= 48); } tmp_size[0] = 1; tmp_size[1] = ii; for (i7 = 0; i7 < 2; i7++) { x[i7] = x_size[i7]; iv69[i7] = tmp_size[i7]; } emlrtSizeEqCheck2DFastR2012b(x, iv69, &b_emlrtECI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ge_emlrtRSI, emlrtRootTLSGlobal); for (i7 = 0; i7 < ii; i7++) { b_x_data[i7] = !b_x_data[i7]; } emlrtPushRtStackR2012b(&ie_emlrtRSI, emlrtRootTLSGlobal); cond = FALSE; emlrtPushRtStackR2012b(&le_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&le_emlrtRSI, emlrtRootTLSGlobal); idx = 1; exitg3 = FALSE; while ((exitg3 == FALSE) && (idx <= ii)) { if (!(b_x_data[idx - 1] == 0)) { cond = TRUE; exitg3 = TRUE; } else { idx++; } } emlrtPopRtStackR2012b(&ie_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&ge_emlrtRSI, emlrtRootTLSGlobal); if (cond) { guard3 = TRUE; } else { cond = FALSE; } } if (guard3 == TRUE) { cond = TRUE; } emlrtPushRtStackR2012b(&he_emlrtRSI, emlrtRootTLSGlobal); if (!cond) { } else { emlrtPushRtStackR2012b(&sc_emlrtRSI, emlrtRootTLSGlobal); e_y = NULL; m14 = mxCreateCharArray(2, iv72); for (idx = 0; idx < 42; idx++) { cv79[idx] = cv80[idx]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 42, m14, cv79); emlrtAssign(&e_y, m14); f_y = NULL; m14 = mxCreateCharArray(2, iv73); for (idx = 0; idx < 9; idx++) { cv81[idx] = cv82[idx]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 9, m14, cv81); emlrtAssign(&f_y, m14); b_error(message(e_y, f_y, &h_emlrtMCI), &h_emlrtMCI); emlrtPopRtStackR2012b(&sc_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&he_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&de_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ee_emlrtRSI, emlrtRootTLSGlobal); ii = (i10 - i9) + 1; loop_ub = i10 - i9; for (i7 = 0; i7 <= loop_ub; i7++) { b_tmp_data[i7] = i9 + i7; } for (i7 = 0; i7 < ii; i7++) { x_data[i7] = cv83[b_tmp_data[i7] - 1]; } guard2 = FALSE; if (ii == 0) { guard2 = TRUE; } else { x_size[0] = 1; x_size[1] = ii; for (i7 = 0; i7 < ii; i7++) { b_x_data[i7] = (x_data[i7] >= 48); } tmp_size[0] = 1; tmp_size[1] = ii; for (i7 = 0; i7 < 2; i7++) { x[i7] = x_size[i7]; iv69[i7] = tmp_size[i7]; } emlrtSizeEqCheck2DFastR2012b(x, iv69, &b_emlrtECI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ge_emlrtRSI, emlrtRootTLSGlobal); for (i7 = 0; i7 < ii; i7++) { b_x_data[i7] = !b_x_data[i7]; } emlrtPushRtStackR2012b(&ie_emlrtRSI, emlrtRootTLSGlobal); cond = FALSE; emlrtPushRtStackR2012b(&le_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&le_emlrtRSI, emlrtRootTLSGlobal); idx = 1; exitg2 = FALSE; while ((exitg2 == FALSE) && (idx <= ii)) { if (!(b_x_data[idx - 1] == 0)) { cond = TRUE; exitg2 = TRUE; } else { idx++; } } emlrtPopRtStackR2012b(&ie_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&ge_emlrtRSI, emlrtRootTLSGlobal); if (cond) { guard2 = TRUE; } else { cond = FALSE; } } if (guard2 == TRUE) { cond = TRUE; } emlrtPushRtStackR2012b(&he_emlrtRSI, emlrtRootTLSGlobal); if (!cond) { } else { emlrtPushRtStackR2012b(&sc_emlrtRSI, emlrtRootTLSGlobal); g_y = NULL; m14 = mxCreateCharArray(2, iv74); for (idx = 0; idx < 42; idx++) { cv79[idx] = cv80[idx]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 42, m14, cv79); emlrtAssign(&g_y, m14); h_y = NULL; m14 = mxCreateCharArray(2, iv75); for (idx = 0; idx < 9; idx++) { cv81[idx] = cv82[idx]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 9, m14, cv81); emlrtAssign(&h_y, m14); b_error(message(g_y, h_y, &h_emlrtMCI), &h_emlrtMCI); emlrtPopRtStackR2012b(&sc_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&he_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&ee_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&fe_emlrtRSI, emlrtRootTLSGlobal); ii = i12 - i11; loop_ub = i12 - i11; for (i7 = 0; i7 < loop_ub; i7++) { tmp_data[i7] = i11 + i7; } for (i7 = 0; i7 < ii; i7++) { x_data[i7] = cv83[tmp_data[i7] - 1]; } b_guard1 = FALSE; if (ii == 0) { b_guard1 = TRUE; } else { x_size[0] = 1; x_size[1] = ii; for (i7 = 0; i7 < ii; i7++) { b_x_data[i7] = (x_data[i7] >= 48); } tmp_size[0] = 1; tmp_size[1] = ii; for (i7 = 0; i7 < 2; i7++) { x[i7] = x_size[i7]; iv69[i7] = tmp_size[i7]; } emlrtSizeEqCheck2DFastR2012b(x, iv69, &b_emlrtECI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ge_emlrtRSI, emlrtRootTLSGlobal); for (i7 = 0; i7 < ii; i7++) { b_x_data[i7] = !b_x_data[i7]; } emlrtPushRtStackR2012b(&ie_emlrtRSI, emlrtRootTLSGlobal); cond = FALSE; emlrtPushRtStackR2012b(&le_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&le_emlrtRSI, emlrtRootTLSGlobal); idx = 1; exitg1 = FALSE; while ((exitg1 == FALSE) && (idx <= ii)) { if (!(b_x_data[idx - 1] == 0)) { cond = TRUE; exitg1 = TRUE; } else { idx++; } } emlrtPopRtStackR2012b(&ie_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&ge_emlrtRSI, emlrtRootTLSGlobal); if (cond) { b_guard1 = TRUE; } else { cond = FALSE; } } if (b_guard1 == TRUE) { cond = TRUE; } emlrtPushRtStackR2012b(&he_emlrtRSI, emlrtRootTLSGlobal); if (!cond) { } else { emlrtPushRtStackR2012b(&sc_emlrtRSI, emlrtRootTLSGlobal); i_y = NULL; m14 = mxCreateCharArray(2, iv76); for (idx = 0; idx < 42; idx++) { cv79[idx] = cv80[idx]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 42, m14, cv79); emlrtAssign(&i_y, m14); j_y = NULL; m14 = mxCreateCharArray(2, iv77); for (idx = 0; idx < 9; idx++) { cv81[idx] = cv82[idx]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 9, m14, cv81); emlrtAssign(&j_y, m14); b_error(message(i_y, j_y, &h_emlrtMCI), &h_emlrtMCI); emlrtPopRtStackR2012b(&sc_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&he_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&fe_emlrtRSI, emlrtRootTLSGlobal); }