/* * repmat.c * * Code generation for function 'repmat' * * C source code generated on: Wed Aug 26 14:59:33 2015 * */ /* Include files */ #include "rt_nonfinite.h" #include "Select_Ground_Motions.h" #include "repmat.h" #include "Select_Ground_Motions_emxutil.h" #include "Select_Ground_Motions_mexutil.h" #include "Select_Ground_Motions_data.h" /* Variable Definitions */ static emlrtRSInfo wl_emlrtRSI = { 48, "eml_assert_valid_size_arg", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/eml_assert_valid_size_arg.m" }; static emlrtRSInfo dp_emlrtRSI = { 19, "repmat", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/elmat/repmat.m" }; static emlrtRSInfo ep_emlrtRSI = { 63, "repmat", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/elmat/repmat.m" }; static emlrtMCInfo xb_emlrtMCI = { 49, 13, "eml_assert_valid_size_arg", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/eml_assert_valid_size_arg.m" }; static emlrtMCInfo yb_emlrtMCI = { 48, 23, "eml_assert_valid_size_arg", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/eml/eml_assert_valid_size_arg.m" }; /* Function Definitions */ void b_repmat(const emxArray_real_T *a, real_T n, emxArray_real_T *b) { boolean_T overflow; const mxArray *y; static const int32_T iv78[2] = { 1, 28 }; const mxArray *m30; char_T cv111[28]; int32_T i; static const char_T cv112[28] = { 'C', 'o', 'd', 'e', 'r', ':', 'M', 'A', 'T', 'L', 'A', 'B', ':', 'N', 'o', 'n', 'I', 'n', 't', 'e', 'g', 'e', 'r', 'I', 'n', 'p', 'u', 't' }; real_T b_n; const mxArray *b_y; static const int32_T iv79[2] = { 1, 21 }; char_T cv113[21]; static const char_T cv114[21] = { 'C', 'o', 'd', 'e', 'r', ':', 'M', 'A', 'T', 'L', 'A', 'B', ':', 'p', 'm', 'a', 'x', 's', 'i', 'z', 'e' }; int32_T mv[2]; int32_T b_a[2]; int32_T outsize[2]; boolean_T b17; int32_T jtilecol; int32_T ia; int32_T k; emlrtPushRtStackR2012b(&dp_emlrtRSI, emlrtRootTLSGlobal); if ((n != n) || muDoubleScalarIsInf(n)) { overflow = FALSE; } else { overflow = TRUE; } if (overflow) { } else { emlrtPushRtStackR2012b(&wl_emlrtRSI, emlrtRootTLSGlobal); y = NULL; m30 = mxCreateCharArray(2, iv78); for (i = 0; i < 28; i++) { cv111[i] = cv112[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 28, m30, cv111); emlrtAssign(&y, m30); error(message(y, &xb_emlrtMCI), &yb_emlrtMCI); emlrtPopRtStackR2012b(&wl_emlrtRSI, emlrtRootTLSGlobal); } if (n <= 0.0) { b_n = 0.0; } else { b_n = n; } if (2.147483647E+9 >= b_n) { } else { emlrtPushRtStackR2012b(&uj_emlrtRSI, emlrtRootTLSGlobal); b_y = NULL; m30 = mxCreateCharArray(2, iv79); for (i = 0; i < 21; i++) { cv113[i] = cv114[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 21, m30, cv113); emlrtAssign(&b_y, m30); error(message(b_y, &rb_emlrtMCI), &sb_emlrtMCI); emlrtPopRtStackR2012b(&uj_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&dp_emlrtRSI, emlrtRootTLSGlobal); mv[0] = 1; mv[1] = (int32_T)n; b_a[0] = a->size[0]; b_a[1] = 1; for (i = 0; i < 2; i++) { outsize[i] = b_a[i] * mv[i]; } i = b->size[0] * b->size[1]; b->size[0] = outsize[0]; b->size[1] = outsize[1]; emxEnsureCapacity((emxArray__common *)b, i, (int32_T)sizeof(real_T), &jc_emlrtRTEI); if ((outsize[0] == 0) || (outsize[1] == 0)) { } else { i = 0; emlrtPushRtStackR2012b(&tl_emlrtRSI, emlrtRootTLSGlobal); if (1 > (int32_T)n) { b17 = FALSE; } else { b17 = ((int32_T)n > 2147483646); } if (b17) { emlrtPushRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); check_forloop_overflow_error(); emlrtPopRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&tl_emlrtRSI, emlrtRootTLSGlobal); for (jtilecol = 1; jtilecol <= (int32_T)n; jtilecol++) { emlrtPushRtStackR2012b(&vl_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&vl_emlrtRSI, emlrtRootTLSGlobal); ia = 0; emlrtPushRtStackR2012b(&ep_emlrtRSI, emlrtRootTLSGlobal); if (1 > a->size[0]) { overflow = FALSE; } else { overflow = (a->size[0] > 2147483646); } if (overflow) { emlrtPushRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); check_forloop_overflow_error(); emlrtPopRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&ep_emlrtRSI, emlrtRootTLSGlobal); for (k = 1; k <= a->size[0]; k++) { b->data[i] = a->data[ia]; ia++; i++; } } } } void repmat(const real_T a_data[1], const int32_T a_size[2], real_T m, emxArray_real_T *b) { boolean_T p; const mxArray *y; static const int32_T iv57[2] = { 1, 28 }; const mxArray *m17; char_T cv73[28]; int32_T i; static const char_T cv74[28] = { 'C', 'o', 'd', 'e', 'r', ':', 'M', 'A', 'T', 'L', 'A', 'B', ':', 'N', 'o', 'n', 'I', 'n', 't', 'e', 'g', 'e', 'r', 'I', 'n', 'p', 'u', 't' }; real_T b_m; const mxArray *b_y; static const int32_T iv58[2] = { 1, 21 }; char_T cv75[21]; static const char_T cv76[21] = { 'C', 'o', 'd', 'e', 'r', ':', 'M', 'A', 'T', 'L', 'A', 'B', ':', 'p', 'm', 'a', 'x', 's', 'i', 'z', 'e' }; int32_T mv[2]; int32_T outsize[2]; int32_T ib; boolean_T b12; emlrtPushRtStackR2012b(&sl_emlrtRSI, emlrtRootTLSGlobal); if ((m != m) || muDoubleScalarIsInf(m)) { p = FALSE; } else { p = TRUE; } if (p) { } else { emlrtPushRtStackR2012b(&wl_emlrtRSI, emlrtRootTLSGlobal); y = NULL; m17 = mxCreateCharArray(2, iv57); for (i = 0; i < 28; i++) { cv73[i] = cv74[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 28, m17, cv73); emlrtAssign(&y, m17); error(message(y, &xb_emlrtMCI), &yb_emlrtMCI); emlrtPopRtStackR2012b(&wl_emlrtRSI, emlrtRootTLSGlobal); } if (m <= 0.0) { b_m = 0.0; } else { b_m = m; } if (2.147483647E+9 >= b_m) { } else { emlrtPushRtStackR2012b(&uj_emlrtRSI, emlrtRootTLSGlobal); b_y = NULL; m17 = mxCreateCharArray(2, iv58); for (i = 0; i < 21; i++) { cv75[i] = cv76[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 21, m17, cv75); emlrtAssign(&b_y, m17); error(message(b_y, &rb_emlrtMCI), &sb_emlrtMCI); emlrtPopRtStackR2012b(&uj_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&sl_emlrtRSI, emlrtRootTLSGlobal); mv[0] = (int32_T)m; mv[1] = 1; for (i = 0; i < 2; i++) { outsize[i] = a_size[i] * mv[i]; } i = b->size[0] * b->size[1]; b->size[0] = outsize[0]; b->size[1] = outsize[1]; emxEnsureCapacity((emxArray__common *)b, i, (int32_T)sizeof(real_T), &jc_emlrtRTEI); if ((outsize[0] == 0) || (outsize[1] == 0)) { } else { ib = 0; emlrtPushRtStackR2012b(&tl_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&tl_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ul_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&ul_emlrtRSI, emlrtRootTLSGlobal); i = 1; while (i <= a_size[1]) { emlrtPushRtStackR2012b(&vl_emlrtRSI, emlrtRootTLSGlobal); if (1 > (int32_T)m) { b12 = FALSE; } else { b12 = ((int32_T)m > 2147483646); } if (b12) { emlrtPushRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); check_forloop_overflow_error(); emlrtPopRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&vl_emlrtRSI, emlrtRootTLSGlobal); for (i = 1; i <= (int32_T)m; i++) { b->data[ib] = a_data[0]; ib++; } i = 2; } } } /* End of code generation (repmat.c) */