/* * log.c * * Code generation for function 'log' * * C source code generated on: Wed Aug 26 14:59:33 2015 * */ /* Include files */ #include "rt_nonfinite.h" #include "Select_Ground_Motions.h" #include "log.h" #include "baker_jayaram_correlation.h" #include "Select_Ground_Motions_data.h" /* Function Definitions */ void b_log(real_T *x) { if (*x < 0.0) { emlrtPushRtStackR2012b(&pd_emlrtRSI, emlrtRootTLSGlobal); b_eml_error(); emlrtPopRtStackR2012b(&pd_emlrtRSI, emlrtRootTLSGlobal); } *x = muDoubleScalarLog(*x); } void c_log(emxArray_real_T *x) { int32_T k; int32_T i26; for (k = 0; k < x->size[1]; k++) { if (x->data[(int32_T)(1.0 + (real_T)k) - 1] < 0.0) { emlrtPushRtStackR2012b(&pd_emlrtRSI, emlrtRootTLSGlobal); b_eml_error(); emlrtPopRtStackR2012b(&pd_emlrtRSI, emlrtRootTLSGlobal); } } i26 = x->size[1]; for (k = 0; k < i26; k++) { x->data[(int32_T)(1.0 + (real_T)k) - 1] = muDoubleScalarLog(x->data[(int32_T) (1.0 + (real_T)k) - 1]); } } void d_log(emxArray_real_T *x) { int32_T i31; int32_T k; i31 = x->size[0] * x->size[1]; for (k = 0; k < i31; k++) { if (x->data[(int32_T)(1.0 + (real_T)k) - 1] < 0.0) { emlrtPushRtStackR2012b(&pd_emlrtRSI, emlrtRootTLSGlobal); b_eml_error(); emlrtPopRtStackR2012b(&pd_emlrtRSI, emlrtRootTLSGlobal); } } i31 = x->size[0] * x->size[1]; for (k = 0; k < i31; k++) { x->data[(int32_T)(1.0 + (real_T)k) - 1] = muDoubleScalarLog(x->data[(int32_T) (1.0 + (real_T)k) - 1]); } } /* End of code generation (log.c) */