/* * mrdivide.c * * Code generation for function 'mrdivide' * * C source code generated on: Wed Aug 26 14:59:33 2015 * */ /* Include files */ #include "rt_nonfinite.h" #include "Select_Ground_Motions.h" #include "mrdivide.h" #include "Select_Ground_Motions_emxutil.h" #include "inv.h" #include "Select_Ground_Motions_mexutil.h" #include "Select_Ground_Motions_data.h" /* Variable Definitions */ static emlrtRSInfo xm_emlrtRSI = { 1, "mrdivide", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/ops/mrdivide.p" }; static emlrtRSInfo ym_emlrtRSI = { 1, "mldivide", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/ops/mldivide.p" }; static emlrtRSInfo an_emlrtRSI = { 20, "eml_lusolve", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/eml_lusolve.m" }; static emlrtRSInfo bn_emlrtRSI = { 70, "eml_lusolve", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/eml_lusolve.m" }; static emlrtRSInfo cn_emlrtRSI = { 54, "eml_lusolve", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/eml_lusolve.m" }; static emlrtRSInfo dn_emlrtRSI = { 37, "eml_qrsolve", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/eml_qrsolve.m" }; static emlrtRSInfo en_emlrtRSI = { 29, "eml_qrsolve", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/eml_qrsolve.m" }; static emlrtRSInfo fn_emlrtRSI = { 8, "eml_xgeqp3", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/lapack/eml_xgeqp3.m" }; static emlrtRSInfo gn_emlrtRSI = { 8, "eml_lapack_xgeqp3", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/lapack/internal/eml_lapack_xgeqp3.m" }; static emlrtRSInfo hn_emlrtRSI = { 64, "eml_matlab_zgeqp3", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zgeqp3.m" }; static emlrtRSInfo in_emlrtRSI = { 37, "eml_matlab_zgeqp3", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zgeqp3.m" }; static emlrtRSInfo jn_emlrtRSI = { 32, "eml_matlab_zgeqp3", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zgeqp3.m" }; static emlrtRSInfo kn_emlrtRSI = { 25, "eml_matlab_zgeqp3", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zgeqp3.m" }; static emlrtRSInfo on_emlrtRSI = { 79, "eml_matlab_zlarfg", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zlarfg.m" }; static emlrtRSInfo pn_emlrtRSI = { 69, "eml_matlab_zlarfg", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zlarfg.m" }; static emlrtRSInfo qn_emlrtRSI = { 66, "eml_matlab_zlarfg", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zlarfg.m" }; static emlrtRSInfo rn_emlrtRSI = { 51, "eml_matlab_zlarfg", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zlarfg.m" }; static emlrtRSInfo sn_emlrtRSI = { 39, "eml_matlab_zlarfg", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zlarfg.m" }; static emlrtRSInfo tn_emlrtRSI = { 18, "eml_matlab_zlarfg", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zlarfg.m" }; static emlrtMCInfo qc_emlrtMCI = { 1, 1, "mrdivide", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/ops/mrdivide.p" }; static emlrtMCInfo rc_emlrtMCI = { 1, 1, "mldivide", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/ops/mldivide.p" }; static emlrtRTEInfo bd_emlrtRTEI = { 1, 2, "mrdivide", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/ops/mrdivide.p" }; static emlrtRTEInfo cd_emlrtRTEI = { 1, 24, "eml_qrsolve", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/eml_qrsolve.m" }; static emlrtRTEInfo fe_emlrtRTEI = { 106, 5, "eml_qrsolve", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/eml_qrsolve.m" }; static emlrtRTEInfo ge_emlrtRTEI = { 99, 5, "eml_qrsolve", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/eml_qrsolve.m" }; /* Function Declarations */ static const mxArray *c_message(const mxArray *b, const mxArray *c, const mxArray *d, emlrtMCInfo *location); static void e_eml_warning(real_T varargin_2, const char_T varargin_3[14]); static real_T eml_qrsolve(const emxArray_real_T *A, emxArray_real_T *B); static real_T eml_xnrm2(int32_T n, const emxArray_real_T *x, int32_T ix0); static void eml_xscal(int32_T n, real_T a, emxArray_real_T *x); /* Function Definitions */ static const mxArray *c_message(const mxArray *b, const mxArray *c, const mxArray *d, emlrtMCInfo *location) { const mxArray *pArrays[3]; const mxArray *m56; pArrays[0] = b; pArrays[1] = c; pArrays[2] = d; return emlrtCallMATLABR2012b(emlrtRootTLSGlobal, 1, &m56, 3, pArrays, "message", TRUE, location); } static void e_eml_warning(real_T varargin_2, const char_T varargin_3[14]) { const mxArray *y; static const int32_T iv70[2] = { 1, 32 }; const mxArray *m26; char_T cv97[32]; int32_T i; static const char_T cv98[32] = { 'C', 'o', 'd', 'e', 'r', ':', 'M', 'A', 'T', 'L', 'A', 'B', ':', 'r', 'a', 'n', 'k', 'D', 'e', 'f', 'i', 'c', 'i', 'e', 'n', 't', 'M', 'a', 't', 'r', 'i', 'x' }; const mxArray *b_y; static const int32_T iv71[2] = { 1, 14 }; char_T b_varargin_3[14]; emlrtPushRtStackR2012b(&ee_emlrtRSI, emlrtRootTLSGlobal); y = NULL; m26 = mxCreateCharArray(2, iv70); for (i = 0; i < 32; i++) { cv97[i] = cv98[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 32, m26, cv97); emlrtAssign(&y, m26); b_y = NULL; m26 = mxCreateCharArray(2, iv71); for (i = 0; i < 14; i++) { b_varargin_3[i] = varargin_3[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 14, m26, b_varargin_3); emlrtAssign(&b_y, m26); warning(c_message(y, emlrt_marshallOut(varargin_2), b_y, &x_emlrtMCI), &y_emlrtMCI); emlrtPopRtStackR2012b(&ee_emlrtRSI, emlrtRootTLSGlobal); } static real_T eml_qrsolve(const emxArray_real_T *A, emxArray_real_T *B) { real_T Y; emxArray_real_T *b_A; int32_T knt; int32_T loop_ub; real_T rankR; real_T d1; real_T xnorm; real_T beta1; boolean_T b16; boolean_T exitg1; const mxArray *y; static const int32_T iv69[2] = { 1, 8 }; const mxArray *m25; char_T cv95[8]; static const char_T cv96[8] = { '%', '%', '%', 'd', '.', '%', 'd', 'e' }; char_T str[14]; emlrtHeapReferenceStackEnterFcnR2012b(emlrtRootTLSGlobal); emxInit_real_T(&b_A, 1, &cd_emlrtRTEI, TRUE); emlrtPushRtStackR2012b(&en_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&fn_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&gn_emlrtRSI, emlrtRootTLSGlobal); knt = b_A->size[0]; b_A->size[0] = A->size[0]; emxEnsureCapacity((emxArray__common *)b_A, knt, (int32_T)sizeof(real_T), &cd_emlrtRTEI); loop_ub = A->size[0]; for (knt = 0; knt < loop_ub; knt++) { b_A->data[knt] = A->data[knt]; } emlrtPushRtStackR2012b(&kn_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&kn_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&jn_emlrtRSI, emlrtRootTLSGlobal); eml_xnrm2(A->size[0], A, 1); emlrtPopRtStackR2012b(&jn_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&in_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&in_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&hn_emlrtRSI, emlrtRootTLSGlobal); rankR = b_A->data[0]; d1 = 0.0; emlrtPushRtStackR2012b(&tn_emlrtRSI, emlrtRootTLSGlobal); xnorm = eml_xnrm2(A->size[0] - 1, b_A, 2); emlrtPopRtStackR2012b(&tn_emlrtRSI, emlrtRootTLSGlobal); if (xnorm != 0.0) { beta1 = muDoubleScalarHypot(b_A->data[0], xnorm); if (b_A->data[0] >= 0.0) { beta1 = -beta1; } if (muDoubleScalarAbs(beta1) < 1.0020841800044864E-292) { knt = 0; do { knt++; emlrtPushRtStackR2012b(&sn_emlrtRSI, emlrtRootTLSGlobal); eml_xscal(A->size[0] - 1, 9.9792015476736E+291, b_A); emlrtPopRtStackR2012b(&sn_emlrtRSI, emlrtRootTLSGlobal); beta1 *= 9.9792015476736E+291; rankR *= 9.9792015476736E+291; } while (!(muDoubleScalarAbs(beta1) >= 1.0020841800044864E-292)); emlrtPushRtStackR2012b(&rn_emlrtRSI, emlrtRootTLSGlobal); xnorm = eml_xnrm2(A->size[0] - 1, b_A, 2); emlrtPopRtStackR2012b(&rn_emlrtRSI, emlrtRootTLSGlobal); beta1 = muDoubleScalarHypot(rankR, xnorm); if (rankR >= 0.0) { beta1 = -beta1; } d1 = (beta1 - rankR) / beta1; emlrtPushRtStackR2012b(&qn_emlrtRSI, emlrtRootTLSGlobal); eml_xscal(A->size[0] - 1, 1.0 / (rankR - beta1), b_A); emlrtPopRtStackR2012b(&qn_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&pn_emlrtRSI, emlrtRootTLSGlobal); if (1 > knt) { b16 = FALSE; } else { b16 = (knt > 2147483646); } if (b16) { emlrtPushRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); check_forloop_overflow_error(); emlrtPopRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&pn_emlrtRSI, emlrtRootTLSGlobal); for (loop_ub = 1; loop_ub <= knt; loop_ub++) { beta1 *= 1.0020841800044864E-292; } rankR = beta1; } else { d1 = (beta1 - b_A->data[0]) / beta1; emlrtPushRtStackR2012b(&on_emlrtRSI, emlrtRootTLSGlobal); xnorm = 1.0 / (b_A->data[0] - beta1); eml_xscal(A->size[0] - 1, xnorm, b_A); emlrtPopRtStackR2012b(&on_emlrtRSI, emlrtRootTLSGlobal); rankR = beta1; } } emlrtPopRtStackR2012b(&hn_emlrtRSI, emlrtRootTLSGlobal); b_A->data[0] = rankR; emlrtPopRtStackR2012b(&gn_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&fn_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&en_emlrtRSI, emlrtRootTLSGlobal); rankR = 0.0; xnorm = muDoubleScalarMax(A->size[0], 1.0) * muDoubleScalarAbs(b_A->data[0]) * 2.2204460492503131E-16; loop_ub = 0; exitg1 = FALSE; while ((exitg1 == FALSE) && (loop_ub <= 0)) { if (muDoubleScalarAbs(b_A->data[0]) <= xnorm) { emlrtPushRtStackR2012b(&dn_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&fe_emlrtRSI, emlrtRootTLSGlobal); y = NULL; m25 = mxCreateCharArray(2, iv69); for (knt = 0; knt < 8; knt++) { cv95[knt] = cv96[knt]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 8, m25, cv95); emlrtAssign(&y, m25); emlrt_marshallIn(c_sprintf(b_sprintf(y, emlrt_marshallOut(14.0), emlrt_marshallOut(6.0), &ab_emlrtMCI), emlrt_marshallOut(xnorm), &bb_emlrtMCI), "sprintf", str); emlrtPopRtStackR2012b(&fe_emlrtRSI, emlrtRootTLSGlobal); e_eml_warning(rankR, str); emlrtPopRtStackR2012b(&dn_emlrtRSI, emlrtRootTLSGlobal); exitg1 = TRUE; } else { rankR++; loop_ub = 1; } } Y = 0.0; if (d1 != 0.0) { xnorm = B->data[0]; for (knt = 1; knt - 1 <= A->size[0] - 2; knt++) { xnorm += b_A->data[knt] * B->data[knt]; } xnorm *= d1; if (xnorm != 0.0) { B->data[0] -= xnorm; for (knt = 1; knt - 1 <= A->size[0] - 2; knt++) { B->data[knt] -= b_A->data[knt] * xnorm; } } } emlrtForLoopVectorCheckR2012b(1.0, 1.0, rankR, mxDOUBLE_CLASS, (int32_T)rankR, &ge_emlrtRTEI, emlrtRootTLSGlobal); for (knt = 0; knt < (int32_T)rankR; knt++) { Y = B->data[0]; } emlrtForLoopVectorCheckR2012b(rankR, -1.0, 1.0, mxDOUBLE_CLASS, (int32_T)-(1.0 + (-1.0 - rankR)), &fe_emlrtRTEI, emlrtRootTLSGlobal); for (knt = 0; knt < (int32_T)-(1.0 + (-1.0 - rankR)); knt++) { Y /= b_A->data[0]; } emxFree_real_T(&b_A); emlrtHeapReferenceStackLeaveFcnR2012b(emlrtRootTLSGlobal); return Y; } static real_T eml_xnrm2(int32_T n, const emxArray_real_T *x, int32_T ix0) { real_T y; ptrdiff_t n_t; ptrdiff_t incx_t; double * xix0_t; emlrtPushRtStackR2012b(&sk_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&tk_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&wk_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&af_emlrtRSI, emlrtRootTLSGlobal); n_t = (ptrdiff_t)(n); emlrtPopRtStackR2012b(&af_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&wk_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&xk_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&af_emlrtRSI, emlrtRootTLSGlobal); incx_t = (ptrdiff_t)(1); emlrtPopRtStackR2012b(&af_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&xk_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&yk_emlrtRSI, emlrtRootTLSGlobal); xix0_t = (double *)(&x->data[ix0 - 1]); emlrtPopRtStackR2012b(&yk_emlrtRSI, emlrtRootTLSGlobal); y = dnrm2(&n_t, xix0_t, &incx_t); emlrtPopRtStackR2012b(&tk_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&sk_emlrtRSI, emlrtRootTLSGlobal); return y; } static void eml_xscal(int32_T n, real_T a, emxArray_real_T *x) { ptrdiff_t n_t; ptrdiff_t incx_t; double * xix0_t; double * a_t; emlrtPushRtStackR2012b(&fi_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&hi_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ji_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&af_emlrtRSI, emlrtRootTLSGlobal); n_t = (ptrdiff_t)(n); emlrtPopRtStackR2012b(&af_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&ji_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ki_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&af_emlrtRSI, emlrtRootTLSGlobal); incx_t = (ptrdiff_t)(1); emlrtPopRtStackR2012b(&af_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&ki_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&li_emlrtRSI, emlrtRootTLSGlobal); xix0_t = (double *)(&x->data[1]); emlrtPopRtStackR2012b(&li_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&mi_emlrtRSI, emlrtRootTLSGlobal); a_t = (double *)(&a); emlrtPopRtStackR2012b(&mi_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ni_emlrtRSI, emlrtRootTLSGlobal); dscal(&n_t, a_t, xix0_t, &incx_t); emlrtPopRtStackR2012b(&ni_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&hi_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&fi_emlrtRSI, emlrtRootTLSGlobal); } real_T b_mrdivide(const real_T B_data[24], const int32_T B_size[2]) { const mxArray *b_y; static const int32_T iv97[2] = { 1, 21 }; const mxArray *m35; char_T cv130[21]; int32_T i; static const char_T cv131[21] = { 'C', 'o', 'd', 'e', 'r', ':', 'M', 'A', 'T', 'L', 'A', 'B', ':', 'd', 'i', 'm', 'a', 'g', 'r', 'e', 'e' }; if (B_size[1] == 1) { } else { emlrtPushRtStackR2012b(&xm_emlrtRSI, emlrtRootTLSGlobal); b_y = NULL; m35 = mxCreateCharArray(2, iv97); for (i = 0; i < 21; i++) { cv130[i] = cv131[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 21, m35, cv130); emlrtAssign(&b_y, m35); error(message(b_y, &qc_emlrtMCI), &qc_emlrtMCI); emlrtPopRtStackR2012b(&xm_emlrtRSI, emlrtRootTLSGlobal); } return 1100.0 / B_data[0]; } real_T c_mrdivide(real_T A, const real_T B_data[24], const int32_T B_size[2]) { real_T y; const mxArray *b_y; static const int32_T iv107[2] = { 1, 21 }; const mxArray *m37; char_T cv136[21]; int32_T i; static const char_T cv137[21] = { 'C', 'o', 'd', 'e', 'r', ':', 'M', 'A', 'T', 'L', 'A', 'B', ':', 'd', 'i', 'm', 'a', 'g', 'r', 'e', 'e' }; if (B_size[1] == 1) { } else { emlrtPushRtStackR2012b(&xm_emlrtRSI, emlrtRootTLSGlobal); b_y = NULL; m37 = mxCreateCharArray(2, iv107); for (i = 0; i < 21; i++) { cv136[i] = cv137[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 21, m37, cv136); emlrtAssign(&b_y, m37); error(message(b_y, &qc_emlrtMCI), &qc_emlrtMCI); emlrtPopRtStackR2012b(&xm_emlrtRSI, emlrtRootTLSGlobal); } y = A; if (A != 0.0) { y = A / B_data[0]; } return y; } void mrdivide(const emxArray_real_T *A, const emxArray_real_T *B, emxArray_real_T *y) { const mxArray *b_y; static const int32_T iv67[2] = { 1, 21 }; const mxArray *m24; char_T cv93[21]; int32_T i; static const char_T cv94[21] = { 'C', 'o', 'd', 'e', 'r', ':', 'M', 'A', 'T', 'L', 'A', 'B', ':', 'd', 'i', 'm', 'a', 'g', 'r', 'e', 'e' }; emxArray_real_T *b_A; int32_T i15; emxArray_real_T *b_B; const mxArray *c_y; static const int32_T iv68[2] = { 1, 21 }; emxArray_real_T *c_B; int32_T info; real_T A_data[1]; real_T d0; emlrtHeapReferenceStackEnterFcnR2012b(emlrtRootTLSGlobal); if (B->size[1] == A->size[1]) { } else { emlrtPushRtStackR2012b(&xm_emlrtRSI, emlrtRootTLSGlobal); b_y = NULL; m24 = mxCreateCharArray(2, iv67); for (i = 0; i < 21; i++) { cv93[i] = cv94[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 21, m24, cv93); emlrtAssign(&b_y, m24); error(message(b_y, &qc_emlrtMCI), &qc_emlrtMCI); emlrtPopRtStackR2012b(&xm_emlrtRSI, emlrtRootTLSGlobal); } emxInit_real_T(&b_A, 1, &bd_emlrtRTEI, TRUE); emlrtPushRtStackR2012b(&xm_emlrtRSI, emlrtRootTLSGlobal); i15 = b_A->size[0]; b_A->size[0] = B->size[1]; emxEnsureCapacity((emxArray__common *)b_A, i15, (int32_T)sizeof(real_T), &bd_emlrtRTEI); i = B->size[1]; for (i15 = 0; i15 < i; i15++) { b_A->data[i15] = B->data[i15]; } emxInit_real_T(&b_B, 1, &bd_emlrtRTEI, TRUE); i15 = b_B->size[0]; b_B->size[0] = A->size[1]; emxEnsureCapacity((emxArray__common *)b_B, i15, (int32_T)sizeof(real_T), &bd_emlrtRTEI); i = A->size[1]; for (i15 = 0; i15 < i; i15++) { b_B->data[i15] = A->data[i15]; } if (b_B->size[0] == b_A->size[0]) { } else { emlrtPushRtStackR2012b(&ym_emlrtRSI, emlrtRootTLSGlobal); c_y = NULL; m24 = mxCreateCharArray(2, iv68); for (i = 0; i < 21; i++) { cv93[i] = cv94[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 21, m24, cv93); emlrtAssign(&c_y, m24); error(message(c_y, &rc_emlrtMCI), &rc_emlrtMCI); emlrtPopRtStackR2012b(&ym_emlrtRSI, emlrtRootTLSGlobal); } emxInit_real_T(&c_B, 1, &bd_emlrtRTEI, TRUE); if ((b_A->size[0] == 0) || (b_B->size[0] == 0)) { i15 = b_B->size[0]; b_B->size[0] = 1; emxEnsureCapacity((emxArray__common *)b_B, i15, (int32_T)sizeof(real_T), &bd_emlrtRTEI); b_B->data[0] = 0.0; } else if (b_A->size[0] == 1) { emlrtPushRtStackR2012b(&ym_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&an_emlrtRSI, emlrtRootTLSGlobal); info = 0; i = b_A->size[0]; for (i15 = 0; i15 < i; i15++) { A_data[i15] = b_A->data[i15]; } if (!(A_data[0] != 0.0)) { info = 1; } if (info > 0) { emlrtPushRtStackR2012b(&bn_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&cn_emlrtRSI, emlrtRootTLSGlobal); eml_warning(); emlrtPopRtStackR2012b(&cn_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&bn_emlrtRSI, emlrtRootTLSGlobal); } if (b_B->data[0] != 0.0) { b_B->data[0] /= b_A->data[0]; } emlrtPopRtStackR2012b(&an_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&ym_emlrtRSI, emlrtRootTLSGlobal); } else { emlrtPushRtStackR2012b(&ym_emlrtRSI, emlrtRootTLSGlobal); i15 = c_B->size[0]; c_B->size[0] = b_B->size[0]; emxEnsureCapacity((emxArray__common *)c_B, i15, (int32_T)sizeof(real_T), &bd_emlrtRTEI); i = b_B->size[0]; for (i15 = 0; i15 < i; i15++) { c_B->data[i15] = b_B->data[i15]; } d0 = eml_qrsolve(b_A, c_B); i15 = b_B->size[0]; b_B->size[0] = 1; emxEnsureCapacity((emxArray__common *)b_B, i15, (int32_T)sizeof(real_T), &bd_emlrtRTEI); b_B->data[0] = d0; emlrtPopRtStackR2012b(&ym_emlrtRSI, emlrtRootTLSGlobal); } emxFree_real_T(&c_B); emxFree_real_T(&b_A); i15 = y->size[0] * y->size[1]; y->size[0] = 1; emxEnsureCapacity((emxArray__common *)y, i15, (int32_T)sizeof(real_T), &bd_emlrtRTEI); i = b_B->size[0]; i15 = y->size[0] * y->size[1]; y->size[1] = i; emxEnsureCapacity((emxArray__common *)y, i15, (int32_T)sizeof(real_T), &bd_emlrtRTEI); i = b_B->size[0]; for (i15 = 0; i15 < i; i15++) { y->data[i15] = b_B->data[i15]; } emxFree_real_T(&b_B); emlrtPopRtStackR2012b(&xm_emlrtRSI, emlrtRootTLSGlobal); emlrtHeapReferenceStackLeaveFcnR2012b(emlrtRootTLSGlobal); } /* End of code generation (mrdivide.c) */