/* * File: main.c * * MATLAB Coder version : 2.8 * C/C++ source code generated on : 08-Nov-2016 04:31:59 */ /*************************************************************************/ /* This automatically generated example C main file shows how to call */ /* entry-point functions that MATLAB Coder generated. You must customize */ /* this file for your application. Do not modify this file directly. */ /* Instead, make a copy of this file, modify it, and integrate it into */ /* your development environment. */ /* */ /* This file initializes entry-point function arguments to a default */ /* size and value before calling the entry-point functions. It does */ /* not store or use any values returned from the entry-point functions. */ /* If necessary, it does pre-allocate memory for returned values. */ /* You can use this file as a starting point for a main function that */ /* you can deploy in your application. */ /* */ /* After you copy the file, and before you deploy it, you must make the */ /* following changes: */ /* * For variable-size function arguments, change the example sizes to */ /* the sizes that your application requires. */ /* * Change the example values of function arguments to the values that */ /* your application requires. */ /* * If the entry-point functions return values, store these values or */ /* otherwise use them as required by your application. */ /* */ /*************************************************************************/ /* Include Files */ #include "rt_nonfinite.h" #include "Select_Ground_Motions.h" #include "main.h" /* Function Declarations */ static emxArray_real_T *argInit_Unboundedx1_real_T(void); static double argInit_real_T(void); static emxArray_real_T *c_argInit_UnboundedxUnbounded_r(void); static void main_Select_Ground_Motions(void); /* Function Definitions */ /* * Arguments : void * Return Type : emxArray_real_T * */ static emxArray_real_T *argInit_Unboundedx1_real_T(void) { emxArray_real_T *result; static int iv0[1] = { 2 }; int b_j0; /* Set the size of the array. Change this size to the value that the application requires. */ result = emxCreateND_real_T(1, iv0); /* Loop over the array to initialize each element. */ for (b_j0 = 0; b_j0 < result->size[0U]; b_j0++) { /* Set the value of the array element. Change this value to the value that the application requires. */ result->data[b_j0] = argInit_real_T(); } return result; } /* * Arguments : void * Return Type : double */ static double argInit_real_T(void) { return 0.0; } /* * Arguments : void * Return Type : emxArray_real_T * */ static emxArray_real_T *c_argInit_UnboundedxUnbounded_r(void) { emxArray_real_T *result; static int iv1[2] = { 2, 2 }; int b_j0; int b_j1; /* Set the size of the array. Change this size to the value that the application requires. */ result = emxCreateND_real_T(2, iv1); /* Loop over the array to initialize each element. */ for (b_j0 = 0; b_j0 < result->size[0U]; b_j0++) { for (b_j1 = 0; b_j1 < result->size[1U]; b_j1++) { /* Set the value of the array element. Change this value to the value that the application requires. */ result->data[b_j0 + result->size[0] * b_j1] = argInit_real_T(); } } return result; } /* * Arguments : void * Return Type : void */ static void main_Select_Ground_Motions(void) { emxArray_real_T *finalRecords; emxArray_real_T *finalDirectios; emxArray_real_T *finalScaleFactors; emxArray_real_T *F_x; emxArray_real_T *F1_y1; emxArray_real_T *F1_y1a; emxArray_real_T *F1_y2; emxArray_real_T *F1_y3; emxArray_real_T *F1_yn; emxArray_real_T *F2_y1; emxArray_real_T *F3_y1; emxArray_real_T *F3_y2; emxArray_real_T *F4_y1; emxArray_real_T *F5_y1; emxArray_real_T *F6_y1; emxArray_real_T *F7_y1; emxArray_real_T *idRef; emxArray_real_T *Sa_1; emxArray_real_T *Sa_2; emxArray_real_T *sVs30; double nGM; double T1; double T1dej; double ecSoilCode; double isScaled; double maxScale; double errCode; double F4_x1[501]; emxInitArray_real_T(&finalRecords, 1); emxInitArray_real_T(&finalDirectios, 1); emxInitArray_real_T(&finalScaleFactors, 1); emxInitArray_real_T(&F_x, 2); emxInitArray_real_T(&F1_y1, 2); emxInitArray_real_T(&F1_y1a, 2); emxInitArray_real_T(&F1_y2, 2); emxInitArray_real_T(&F1_y3, 2); emxInitArray_real_T(&F1_yn, 2); emxInitArray_real_T(&F2_y1, 2); emxInitArray_real_T(&F3_y1, 2); emxInitArray_real_T(&F3_y2, 2); emxInitArray_real_T(&F4_y1, 2); emxInitArray_real_T(&F5_y1, 2); emxInitArray_real_T(&F6_y1, 2); emxInitArray_real_T(&F7_y1, 2); /* Initialize function 'Select_Ground_Motions' input arguments. */ /* Initialize function input argument 'idRef'. */ idRef = argInit_Unboundedx1_real_T(); /* Initialize function input argument 'Sa_1'. */ Sa_1 = c_argInit_UnboundedxUnbounded_r(); /* Initialize function input argument 'Sa_2'. */ Sa_2 = c_argInit_UnboundedxUnbounded_r(); /* Initialize function input argument 'sVs30'. */ sVs30 = argInit_Unboundedx1_real_T(); nGM = argInit_real_T(); T1 = argInit_real_T(); T1dej = argInit_real_T(); ecSoilCode = argInit_real_T(); isScaled = argInit_real_T(); maxScale = argInit_real_T(); /* Call the entry-point 'Select_Ground_Motions'. */ Select_Ground_Motions(idRef, Sa_1, Sa_2, sVs30, nGM, T1, T1dej, ecSoilCode, isScaled, maxScale, argInit_real_T(), argInit_real_T(), argInit_real_T(), argInit_real_T(), argInit_real_T(), argInit_real_T(), argInit_real_T(), argInit_real_T(), argInit_real_T(), argInit_real_T(), finalRecords, finalDirectios, finalScaleFactors, F_x, F1_y1, F1_y1a, F1_y2, F1_y3, F1_yn, F2_y1, F3_y1, F3_y2, F4_x1, F4_y1, F5_y1, F6_y1, F7_y1, &errCode); emxDestroyArray_real_T(F7_y1); emxDestroyArray_real_T(F6_y1); emxDestroyArray_real_T(F5_y1); emxDestroyArray_real_T(F4_y1); emxDestroyArray_real_T(F3_y2); emxDestroyArray_real_T(F3_y1); emxDestroyArray_real_T(F2_y1); emxDestroyArray_real_T(F1_yn); emxDestroyArray_real_T(F1_y3); emxDestroyArray_real_T(F1_y2); emxDestroyArray_real_T(F1_y1a); emxDestroyArray_real_T(F1_y1); emxDestroyArray_real_T(F_x); emxDestroyArray_real_T(finalScaleFactors); emxDestroyArray_real_T(finalDirectios); emxDestroyArray_real_T(finalRecords); emxDestroyArray_real_T(sVs30); emxDestroyArray_real_T(Sa_2); emxDestroyArray_real_T(Sa_1); emxDestroyArray_real_T(idRef); } /* * Arguments : int argc * const char * const argv[] * Return Type : int */ int main(int argc, const char * const argv[]) { (void)argc; (void)argv; /* Initialize the application. You do not need to do this more than one time. */ Select_Ground_Motions_initialize(); /* Invoke the entry-point functions. You can call entry-point functions multiple times. */ main_Select_Ground_Motions(); /* Terminate the application. You do not need to do this more than one time. */ Select_Ground_Motions_terminate(); return 0; } /* * File trailer for main.c * * [EOF] */