/* * all.c * * Code generation for function 'all' * * C source code generated on: Wed Aug 26 14:59:33 2015 * */ /* Include files */ #include "rt_nonfinite.h" #include "Select_Ground_Motions.h" #include "all.h" #include "isequal.h" #include "Select_Ground_Motions_emxutil.h" #include "Select_Ground_Motions_mexutil.h" #include "Select_Ground_Motions_data.h" /* Variable Definitions */ static emlrtRSInfo mg_emlrtRSI = { 12, "all", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/ops/all.m" }; static emlrtRTEInfo vb_emlrtRTEI = { 1, 14, "all", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/ops/all.m" }; /* Function Definitions */ void all(const emxArray_real_T *x, emxArray_boolean_T *y) { boolean_T overflow; const mxArray *b_y; static const int32_T iv49[2] = { 1, 41 }; const mxArray *m11; char_T cv57[41]; int32_T i; static const char_T cv58[41] = { 'C', 'o', 'd', 'e', 'r', ':', 't', 'o', 'o', 'l', 'b', 'o', 'x', ':', 'e', 'm', 'l', '_', 'a', 'l', 'l', '_', 'o', 'r', '_', 'a', 'n', 'y', '_', 's', 'p', 'e', 'c', 'i', 'a', 'l', 'E', 'm', 'p', 't', 'y' }; const mxArray *c_y; static const int32_T iv50[2] = { 1, 51 }; char_T cv59[51]; static const char_T cv60[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' }; uint32_T outsize[2]; int32_T i2; int32_T iy; int32_T i1; boolean_T b_i1; boolean_T exitg1; emlrtPushRtStackR2012b(&mg_emlrtRSI, emlrtRootTLSGlobal); overflow = !b_isequal(x); if (overflow) { } else { emlrtPushRtStackR2012b(&oc_emlrtRSI, emlrtRootTLSGlobal); b_y = NULL; m11 = mxCreateCharArray(2, iv49); for (i = 0; i < 41; i++) { cv57[i] = cv58[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 41, m11, cv57); emlrtAssign(&b_y, m11); error(message(b_y, &i_emlrtMCI), &j_emlrtMCI); emlrtPopRtStackR2012b(&oc_emlrtRSI, emlrtRootTLSGlobal); } if (((x->size[0] == 1) && (x->size[1] == 1)) || (x->size[0] != 1)) { overflow = TRUE; } else { overflow = FALSE; } if (overflow) { } else { emlrtPushRtStackR2012b(&pc_emlrtRSI, emlrtRootTLSGlobal); c_y = NULL; m11 = mxCreateCharArray(2, iv50); for (i = 0; i < 51; i++) { cv59[i] = cv60[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 51, m11, cv59); emlrtAssign(&c_y, m11); error(message(c_y, &k_emlrtMCI), &l_emlrtMCI); emlrtPopRtStackR2012b(&pc_emlrtRSI, emlrtRootTLSGlobal); } for (i = 0; i < 2; i++) { outsize[i] = (uint32_T)x->size[i]; } i = y->size[0] * y->size[1]; y->size[0] = 1; emxEnsureCapacity((emxArray__common *)y, i, (int32_T)sizeof(boolean_T), &vb_emlrtRTEI); i = y->size[0] * y->size[1]; y->size[1] = (int32_T)outsize[1]; emxEnsureCapacity((emxArray__common *)y, i, (int32_T)sizeof(boolean_T), &vb_emlrtRTEI); i2 = (int32_T)outsize[1]; for (i = 0; i < i2; i++) { y->data[i] = TRUE; } i2 = 0; iy = -1; emlrtPushRtStackR2012b(&ng_emlrtRSI, emlrtRootTLSGlobal); if (1 > x->size[1]) { overflow = FALSE; } else { overflow = (x->size[1] > 2147483646); } if (overflow) { emlrtPushRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); check_forloop_overflow_error(); emlrtPopRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&ng_emlrtRSI, emlrtRootTLSGlobal); for (i = 1; i <= x->size[1]; i++) { i1 = i2 + 1; i2 += x->size[0]; iy++; emlrtPushRtStackR2012b(&qc_emlrtRSI, emlrtRootTLSGlobal); if (i1 > i2) { b_i1 = FALSE; } else { b_i1 = (i2 > 2147483646); } if (b_i1) { emlrtPushRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); check_forloop_overflow_error(); emlrtPopRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&qc_emlrtRSI, emlrtRootTLSGlobal); exitg1 = FALSE; while ((exitg1 == FALSE) && (i1 <= i2)) { if (x->data[i1 - 1] == 0.0) { y->data[iy] = FALSE; exitg1 = TRUE; } else { i1++; } } } emlrtPopRtStackR2012b(&mg_emlrtRSI, emlrtRootTLSGlobal); } boolean_T b_all(const emxArray_boolean_T *x) { boolean_T y; boolean_T overflow; const mxArray *b_y; static const int32_T iv51[2] = { 1, 41 }; const mxArray *m12; char_T cv61[41]; int32_T i; static const char_T cv62[41] = { 'C', 'o', 'd', 'e', 'r', ':', 't', 'o', 'o', 'l', 'b', 'o', 'x', ':', 'e', 'm', 'l', '_', 'a', 'l', 'l', '_', 'o', 'r', '_', 'a', 'n', 'y', '_', 's', 'p', 'e', 'c', 'i', 'a', 'l', 'E', 'm', 'p', 't', 'y' }; const mxArray *c_y; static const int32_T iv52[2] = { 1, 51 }; char_T cv63[51]; static const char_T cv64[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; emlrtPushRtStackR2012b(&mg_emlrtRSI, emlrtRootTLSGlobal); overflow = !isequal(x); if (overflow) { } else { emlrtPushRtStackR2012b(&oc_emlrtRSI, emlrtRootTLSGlobal); b_y = NULL; m12 = mxCreateCharArray(2, iv51); for (i = 0; i < 41; i++) { cv61[i] = cv62[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 41, m12, cv61); emlrtAssign(&b_y, m12); error(message(b_y, &i_emlrtMCI), &j_emlrtMCI); emlrtPopRtStackR2012b(&oc_emlrtRSI, emlrtRootTLSGlobal); } if ((x->size[1] == 1) || (x->size[1] != 1)) { overflow = TRUE; } else { overflow = FALSE; } if (overflow) { } else { emlrtPushRtStackR2012b(&pc_emlrtRSI, emlrtRootTLSGlobal); c_y = NULL; m12 = mxCreateCharArray(2, iv52); for (i = 0; i < 51; i++) { cv63[i] = cv64[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 51, m12, cv63); emlrtAssign(&c_y, m12); error(message(c_y, &k_emlrtMCI), &l_emlrtMCI); emlrtPopRtStackR2012b(&pc_emlrtRSI, emlrtRootTLSGlobal); } y = TRUE; emlrtPushRtStackR2012b(&qc_emlrtRSI, emlrtRootTLSGlobal); if (1 > x->size[1]) { overflow = FALSE; } else { overflow = (x->size[1] > 2147483646); } if (overflow) { emlrtPushRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); check_forloop_overflow_error(); emlrtPopRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&qc_emlrtRSI, emlrtRootTLSGlobal); i = 1; exitg1 = FALSE; while ((exitg1 == FALSE) && (i <= x->size[1])) { if (x->data[i - 1] == 0) { y = FALSE; exitg1 = TRUE; } else { i++; } } emlrtPopRtStackR2012b(&mg_emlrtRSI, emlrtRootTLSGlobal); return y; } boolean_T c_all(const emxArray_boolean_T *x) { boolean_T y; boolean_T overflow; const mxArray *b_y; static const int32_T iv76[2] = { 1, 41 }; const mxArray *m29; char_T cv107[41]; int32_T i; static const char_T cv108[41] = { 'C', 'o', 'd', 'e', 'r', ':', 't', 'o', 'o', 'l', 'b', 'o', 'x', ':', 'e', 'm', 'l', '_', 'a', 'l', 'l', '_', 'o', 'r', '_', 'a', 'n', 'y', '_', 's', 'p', 'e', 'c', 'i', 'a', 'l', 'E', 'm', 'p', 't', 'y' }; const mxArray *c_y; static const int32_T iv77[2] = { 1, 51 }; char_T cv109[51]; static const char_T cv110[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; emlrtPushRtStackR2012b(&mg_emlrtRSI, emlrtRootTLSGlobal); overflow = !c_isequal(x); if (overflow) { } else { emlrtPushRtStackR2012b(&oc_emlrtRSI, emlrtRootTLSGlobal); b_y = NULL; m29 = mxCreateCharArray(2, iv76); for (i = 0; i < 41; i++) { cv107[i] = cv108[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 41, m29, cv107); emlrtAssign(&b_y, m29); error(message(b_y, &i_emlrtMCI), &j_emlrtMCI); emlrtPopRtStackR2012b(&oc_emlrtRSI, emlrtRootTLSGlobal); } if ((x->size[0] == 1) || (x->size[0] != 1)) { overflow = TRUE; } else { overflow = FALSE; } if (overflow) { } else { emlrtPushRtStackR2012b(&pc_emlrtRSI, emlrtRootTLSGlobal); c_y = NULL; m29 = mxCreateCharArray(2, iv77); for (i = 0; i < 51; i++) { cv109[i] = cv110[i]; } emlrtInitCharArrayR2013a(emlrtRootTLSGlobal, 51, m29, cv109); emlrtAssign(&c_y, m29); error(message(c_y, &k_emlrtMCI), &l_emlrtMCI); emlrtPopRtStackR2012b(&pc_emlrtRSI, emlrtRootTLSGlobal); } y = TRUE; emlrtPushRtStackR2012b(&qc_emlrtRSI, emlrtRootTLSGlobal); if (1 > x->size[0]) { overflow = FALSE; } else { overflow = (x->size[0] > 2147483646); } if (overflow) { emlrtPushRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); check_forloop_overflow_error(); emlrtPopRtStackR2012b(&lc_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&qc_emlrtRSI, emlrtRootTLSGlobal); i = 1; exitg1 = FALSE; while ((exitg1 == FALSE) && (i <= x->size[0])) { if (x->data[i - 1] == 0) { y = FALSE; exitg1 = TRUE; } else { i++; } } emlrtPopRtStackR2012b(&mg_emlrtRSI, emlrtRootTLSGlobal); return y; } /* End of code generation (all.c) */