/*
 * File: sqrt.c
 *
 * MATLAB Coder version            : 3.4
 * C/C++ source code generated on  : 27-Feb-2019 07:31:56
 */

/* Include Files */
#include "rt_nonfinite.h"
#include "MLS.h"
#include "sqrt.h"
#include "MLS_emxutil.h"

/* Function Definitions */

/*
 * Arguments    : const emxArray_real_T *x
 *                emxArray_real_T *b_x
 * Return Type  : void
 */
void b_sqrt(const emxArray_real_T *x, emxArray_real_T *b_x)
{
  int i2;
  int loop_ub;
  i2 = b_x->size[0];
  b_x->size[0] = x->size[0];
  emxEnsureCapacity_real_T1(b_x, i2);
  loop_ub = x->size[0];
  for (i2 = 0; i2 < loop_ub; i2++) {
    b_x->data[i2] = x->data[i2];
  }

  c_sqrt(b_x);
}

/*
 * Arguments    : emxArray_real_T *x
 * Return Type  : void
 */
void c_sqrt(emxArray_real_T *x)
{
  int nx;
  int k;
  nx = x->size[0];
  for (k = 0; k + 1 <= nx; k++) {
    x->data[k] = sqrt(x->data[k]);
  }
}

/*
 * File trailer for sqrt.c
 *
 * [EOF]
 */
