/* * issorted.c * * Code generation for function 'issorted' * * C source code generated on: Wed Aug 26 14:59:33 2015 * */ /* Include files */ #include "rt_nonfinite.h" #include "Select_Ground_Motions.h" #include "issorted.h" /* Variable Definitions */ static emlrtRSInfo dl_emlrtRSI = { 22, "issorted", "/usr/local/MATLAB/R2013a/toolbox/eml/lib/matlab/datafun/issorted.m" }; /* Function Definitions */ boolean_T issorted(const emxArray_real_T *x) { boolean_T y; int32_T k; boolean_T exitg1; boolean_T p; y = TRUE; if (x->size[0] == 0) { } else { emlrtPushRtStackR2012b(&dl_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&dl_emlrtRSI, emlrtRootTLSGlobal); k = 1; exitg1 = FALSE; while ((exitg1 == FALSE) && (k <= x->size[0] - 1)) { if ((x->data[k - 1] <= x->data[k]) || muDoubleScalarIsNaN(x->data[k])) { p = TRUE; } else { p = FALSE; } if (!p) { y = FALSE; exitg1 = TRUE; } else { k++; } } } return y; } /* End of code generation (issorted.c) */