⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c5_std5.c

📁 mmo 信道估计算法 matlab 仿真 实现了无线信道环境下的信道估计
💻 C
📖 第 1 页 / 共 4 页
字号:
            goto label_2;
          }
        }
      }
    }
    if(c5_c_x == 0.0) {
      if(c5_y > 0.0) {
        c5_r = 1.5707963267948966E+000;
      } else if(c5_y < 0.0) {
        c5_r = -1.5707963267948966E+000;
      } else {
        c5_r = 0.0;
      }
    } else {
      c5_o_x = atan2(c5_y, c5_c_x);
      c5_r = c5_o_x;
    }
    goto label_2;
    label_1:;
    c5_r = rtNaN;
    label_2:;
    c5_R[(int32_T)_SFD_EML_ARRAY_BOUNDS_CHECK("R",
     (int32_T)_SFD_INTEGER_CHECK("k", c5_b_k), 1, 2, 1) - 1] = c5_r;
  }
  for(c5_i57 = 0; c5_i57 < 2; c5_i57 = c5_i57 + 1) {
    c5_b_x[c5_i57].re = c5_R[c5_i57];
    c5_b_x[c5_i57].im = 0.0;
  }
}

static void c5_b_repmat(creal_T *c5_a, creal_T *c5_b)
{
  int32_T c5_i58;
  int32_T c5_i59;
  int32_T c5_ia;
  int32_T c5_ib;
  int32_T c5_iacol;
  real_T c5_jcol;
  real_T c5_itilerow;
  int32_T c5_b_a;
  int32_T c5_c_a;
  for(c5_i58 = 0; c5_i58 < 2; c5_i58 = c5_i58 + 1) {
    for(c5_i59 = 0; c5_i59 < 48; c5_i59 = c5_i59 + 1) {
      c5_b[c5_i59 + 48 * c5_i58].re = 0.0;
      c5_b[c5_i59 + 48 * c5_i58].im = 0.0;
    }
  }
  c5_ia = 1;
  c5_ib = 1;
  c5_iacol = 1;
  for(c5_jcol = 1.0; c5_jcol <= 2.0; c5_jcol = c5_jcol + 1.0) {
    for(c5_itilerow = 1.0; c5_itilerow <= 48.0; c5_itilerow = c5_itilerow + 1.0)
    {
      c5_ia = c5_iacol;
      c5_b[_SFD_EML_ARRAY_BOUNDS_CHECK("b", _SFD_INTEGER_CHECK("ib",
        (real_T)c5_ib), 1, 96, 1) - 1].re = c5_a[_SFD_EML_ARRAY_BOUNDS_CHECK(
        "a", _SFD_INTEGER_CHECK("ia", (real_T)c5_ia), 1, 2, 1) - 1].re;
      c5_b[_SFD_EML_ARRAY_BOUNDS_CHECK("b", _SFD_INTEGER_CHECK("ib",
        (real_T)c5_ib), 1, 96, 1) - 1].im = c5_a[_SFD_EML_ARRAY_BOUNDS_CHECK(
        "a", _SFD_INTEGER_CHECK("ia", (real_T)c5_ia), 1, 2, 1) - 1].im;
      c5_b_a = c5_ia;
      c5_ia = c5_b_a + 1;
      c5_c_a = c5_ib;
      c5_ib = c5_c_a + 1;
    }
    c5_iacol = c5_ia;
  }
}

static void c5_exp(creal_T *c5_x, creal_T *c5_b_x)
{
  int32_T c5_i60;
  int32_T c5_i61;
  real_T c5_k;
  real_T c5_b_k;
  creal_T c5_xk;
  real_T c5_r;
  for(c5_i60 = 0; c5_i60 < 2; c5_i60 = c5_i60 + 1) {
    for(c5_i61 = 0; c5_i61 < 48; c5_i61 = c5_i61 + 1) {
      c5_b_x[c5_i61 + 48 * c5_i60].re = c5_x[c5_i61 + 48 * c5_i60].re;
      c5_b_x[c5_i61 + 48 * c5_i60].im = c5_x[c5_i61 + 48 * c5_i60].im;
    }
  }
  for(c5_k = 1.0; c5_k <= 96.0; c5_k = c5_k + 1.0) {
    c5_b_k = c5_k;
    c5_xk.re = c5_b_x[(int32_T)_SFD_EML_ARRAY_BOUNDS_CHECK("x",
     (int32_T)_SFD_INTEGER_CHECK("k", c5_b_k), 1, 96, 1) - 1].re;
    c5_xk.im = c5_b_x[(int32_T)_SFD_EML_ARRAY_BOUNDS_CHECK("x",
     (int32_T)_SFD_INTEGER_CHECK("k", c5_b_k), 1, 96, 1) - 1].im;
    c5_r = exp(c5_xk.re);
    c5_b_x[(int32_T)_SFD_EML_ARRAY_BOUNDS_CHECK("x",
     (int32_T)_SFD_INTEGER_CHECK("k", c5_b_k), 1, 96, 1) - 1].re = c5_r *
      cos(c5_xk.im);
    c5_b_x[(int32_T)_SFD_EML_ARRAY_BOUNDS_CHECK("x",
     (int32_T)_SFD_INTEGER_CHECK("k", c5_b_k), 1, 96, 1) - 1].im = c5_r *
      sin(c5_xk.im);
  }
}

static const mxArray *c5_sf_marshall(void *c5_chartInstance, void *c5_u)
{
  const mxArray *c5_y = NULL;
  int32_T c5_i62;
  int32_T c5_i63;
  real_T c5_b_u[8];
  const mxArray *c5_b_y = NULL;
  c5_y = NULL;
  for(c5_i62 = 0; c5_i62 < 2; c5_i62 = c5_i62 + 1) {
    for(c5_i63 = 0; c5_i63 < 4; c5_i63 = c5_i63 + 1) {
      c5_b_u[c5_i63 + (c5_i62 << 2)] = (*(real_T (*)[8])c5_u)[c5_i63 + (c5_i62
        << 2)];
    }
  }
  c5_b_y = NULL;
  sf_mex_assign(&c5_b_y, sf_mex_create(&c5_b_u, "y", 0, 0U, 1U, 2, 4, 2));
  sf_mex_assign(&c5_y, c5_b_y);
  return c5_y;
}

static const mxArray *c5_b_sf_marshall(void *c5_chartInstance, void *c5_u)
{
  const mxArray *c5_y = NULL;
  int32_T c5_i64;
  creal_T c5_b_u[52];
  const mxArray *c5_b_y = NULL;
  c5_y = NULL;
  for(c5_i64 = 0; c5_i64 < 52; c5_i64 = c5_i64 + 1) {
    c5_b_u[c5_i64].re = (*(creal_T (*)[52])c5_u)[c5_i64].re;
    c5_b_u[c5_i64].im = (*(creal_T (*)[52])c5_u)[c5_i64].im;
  }
  c5_b_y = NULL;
  sf_mex_assign(&c5_b_y, sf_mex_create(&c5_b_u, "y", 0, 1U, 1U, 1, 52));
  sf_mex_assign(&c5_y, c5_b_y);
  return c5_y;
}

static const mxArray *c5_c_sf_marshall(void *c5_chartInstance, void *c5_u)
{
  const mxArray *c5_y = NULL;
  int32_T c5_i65;
  int32_T c5_i66;
  creal_T c5_b_u[96];
  const mxArray *c5_b_y = NULL;
  c5_y = NULL;
  for(c5_i65 = 0; c5_i65 < 2; c5_i65 = c5_i65 + 1) {
    for(c5_i66 = 0; c5_i66 < 48; c5_i66 = c5_i66 + 1) {
      c5_b_u[c5_i66 + 48 * c5_i65].re = (*(creal_T (*)[96])c5_u)[c5_i66 + 48 *
        c5_i65].re;
      c5_b_u[c5_i66 + 48 * c5_i65].im = (*(creal_T (*)[96])c5_u)[c5_i66 + 48 *
        c5_i65].im;
    }
  }
  c5_b_y = NULL;
  sf_mex_assign(&c5_b_y, sf_mex_create(&c5_b_u, "y", 0, 1U, 1U, 2, 48, 2));
  sf_mex_assign(&c5_y, c5_b_y);
  return c5_y;
}

static const mxArray *c5_d_sf_marshall(void *c5_chartInstance, void *c5_u)
{
  const mxArray *c5_y = NULL;
  int32_T c5_i67;
  int32_T c5_i68;
  creal_T c5_b_u[8];
  const mxArray *c5_b_y = NULL;
  c5_y = NULL;
  for(c5_i67 = 0; c5_i67 < 2; c5_i67 = c5_i67 + 1) {
    for(c5_i68 = 0; c5_i68 < 4; c5_i68 = c5_i68 + 1) {
      c5_b_u[c5_i68 + (c5_i67 << 2)].re = (*(creal_T (*)[8])c5_u)[c5_i68 +
        (c5_i67 << 2)].re;
      c5_b_u[c5_i68 + (c5_i67 << 2)].im = (*(creal_T (*)[8])c5_u)[c5_i68 +
        (c5_i67 << 2)].im;
    }
  }
  c5_b_y = NULL;
  sf_mex_assign(&c5_b_y, sf_mex_create(&c5_b_u, "y", 0, 1U, 1U, 2, 4, 2));
  sf_mex_assign(&c5_y, c5_b_y);
  return c5_y;
}

static const mxArray *c5_e_sf_marshall(void *c5_chartInstance, void *c5_u)
{
  const mxArray *c5_y = NULL;
  int32_T c5_i69;
  int32_T c5_i70;
  creal_T c5_b_u[96];
  const mxArray *c5_b_y = NULL;
  c5_y = NULL;
  for(c5_i69 = 0; c5_i69 < 2; c5_i69 = c5_i69 + 1) {
    for(c5_i70 = 0; c5_i70 < 48; c5_i70 = c5_i70 + 1) {
      c5_b_u[c5_i70 + 48 * c5_i69].re = (*(creal_T (*)[96])c5_u)[c5_i70 + 48 *
        c5_i69].re;
      c5_b_u[c5_i70 + 48 * c5_i69].im = (*(creal_T (*)[96])c5_u)[c5_i70 + 48 *
        c5_i69].im;
    }
  }
  c5_b_y = NULL;
  sf_mex_assign(&c5_b_y, sf_mex_create(&c5_b_u, "y", 0, 1U, 1U, 2, 48, 2));
  sf_mex_assign(&c5_y, c5_b_y);
  return c5_y;
}

static const mxArray *c5_f_sf_marshall(void *c5_chartInstance, void *c5_u)
{
  const mxArray *c5_y = NULL;
  real_T c5_b_u;
  const mxArray *c5_b_y = NULL;
  c5_y = NULL;
  c5_b_u = *(real_T *)c5_u;
  c5_b_y = NULL;
  sf_mex_assign(&c5_b_y, sf_mex_create(&c5_b_u, "y", 0, 0U, 0U, 0));
  sf_mex_assign(&c5_y, c5_b_y);
  return c5_y;
}

static const mxArray *c5_g_sf_marshall(void *c5_chartInstance, void *c5_u)
{
  const mxArray *c5_y = NULL;
  int32_T c5_i71;
  real_T c5_b_u[127];
  const mxArray *c5_b_y = NULL;
  c5_y = NULL;
  for(c5_i71 = 0; c5_i71 < 127; c5_i71 = c5_i71 + 1) {
    c5_b_u[c5_i71] = (*(real_T (*)[127])c5_u)[c5_i71];
  }
  c5_b_y = NULL;
  sf_mex_assign(&c5_b_y, sf_mex_create(&c5_b_u, "y", 0, 0U, 1U, 2, 1, 127));
  sf_mex_assign(&c5_y, c5_b_y);
  return c5_y;
}

static const mxArray *c5_h_sf_marshall(void *c5_chartInstance, void *c5_u)
{
  const mxArray *c5_y = NULL;
  int32_T c5_i72;
  real_T c5_b_u[4];
  const mxArray *c5_b_y = NULL;
  c5_y = NULL;
  for(c5_i72 = 0; c5_i72 < 4; c5_i72 = c5_i72 + 1) {
    c5_b_u[c5_i72] = (*(real_T (*)[4])c5_u)[c5_i72];
  }
  c5_b_y = NULL;
  sf_mex_assign(&c5_b_y, sf_mex_create(&c5_b_u, "y", 0, 0U, 1U, 1, 4));
  sf_mex_assign(&c5_y, c5_b_y);
  return c5_y;
}

static const mxArray *c5_i_sf_marshall(void *c5_chartInstance, void *c5_u)
{
  const mxArray *c5_y = NULL;
  int32_T c5_i73;
  int32_T c5_i74;
  real_T c5_b_u[508];
  const mxArray *c5_b_y = NULL;
  c5_y = NULL;
  for(c5_i73 = 0; c5_i73 < 127; c5_i73 = c5_i73 + 1) {
    for(c5_i74 = 0; c5_i74 < 4; c5_i74 = c5_i74 + 1) {
      c5_b_u[c5_i74 + (c5_i73 << 2)] = (*(real_T (*)[508])c5_u)[c5_i74 + (c5_i73
        << 2)];
    }
  }
  c5_b_y = NULL;
  sf_mex_assign(&c5_b_y, sf_mex_create(&c5_b_u, "y", 0, 0U, 1U, 2, 4, 127));
  sf_mex_assign(&c5_y, c5_b_y);
  return c5_y;
}

static const mxArray *c5_j_sf_marshall(void *c5_chartInstance, void *c5_u)
{
  const mxArray *c5_y = NULL;
  int32_T c5_i75;
  int32_T c5_i76;
  real_T c5_b_u[8];
  const mxArray *c5_b_y = NULL;
  c5_y = NULL;
  for(c5_i75 = 0; c5_i75 < 2; c5_i75 = c5_i75 + 1) {
    for(c5_i76 = 0; c5_i76 < 4; c5_i76 = c5_i76 + 1) {
      c5_b_u[c5_i76 + (c5_i75 << 2)] = (*(real_T (*)[8])c5_u)[c5_i76 + (c5_i75
        << 2)];
    }
  }
  c5_b_y = NULL;
  sf_mex_assign(&c5_b_y, sf_mex_create(&c5_b_u, "y", 0, 0U, 1U, 2, 4, 2));
  sf_mex_assign(&c5_y, c5_b_y);
  return c5_y;
}

static const mxArray *c5_k_sf_marshall(void *c5_chartInstance, void *c5_u)
{
  const mxArray *c5_y = NULL;
  int32_T c5_i77;
  int32_T c5_i78;
  real_T c5_b_u[8];
  const mxArray *c5_b_y = NULL;
  c5_y = NULL;
  for(c5_i77 = 0; c5_i77 < 2; c5_i77 = c5_i77 + 1) {
    for(c5_i78 = 0; c5_i78 < 4; c5_i78 = c5_i78 + 1) {
      c5_b_u[c5_i78 + (c5_i77 << 2)] = (*(real_T (*)[8])c5_u)[c5_i78 + (c5_i77
        << 2)];
    }
  }
  c5_b_y = NULL;
  sf_mex_assign(&c5_b_y, sf_mex_create(&c5_b_u, "y", 0, 0U, 1U, 2, 4, 2));
  sf_mex_assign(&c5_y, c5_b_y);
  return c5_y;
}

static const mxArray *c5_l_sf_marshall(void *c5_chartInstance, void *c5_u)
{
  const mxArray *c5_y = NULL;
  int32_T c5_i79;
  int32_T c5_i80;
  creal_T c5_b_u[8];
  const mxArray *c5_b_y = NULL;
  c5_y = NULL;
  for(c5_i79 = 0; c5_i79 < 2; c5_i79 = c5_i79 + 1) {
    for(c5_i80 = 0; c5_i80 < 4; c5_i80 = c5_i80 + 1) {
      c5_b_u[c5_i80 + (c5_i79 << 2)].re = (*(creal_T (*)[8])c5_u)[c5_i80 +
        (c5_i79 << 2)].re;
      c5_b_u[c5_i80 + (c5_i79 << 2)].im = (*(creal_T (*)[8])c5_u)[c5_i80 +
        (c5_i79 << 2)].im;
    }
  }
  c5_b_y = NULL;
  sf_mex_assign(&c5_b_y, sf_mex_create(&c5_b_u, "y", 0, 1U, 1U, 2, 4, 2));
  sf_mex_assign(&c5_y, c5_b_y);
  return c5_y;
}

static const mxArray *c5_m_sf_marshall(void *c5_chartInstance, void *c5_u)
{
  const mxArray *c5_y = NULL;
  int32_T c5_i81;
  creal_T c5_b_u[2];
  const mxArray *c5_b_y = NULL;
  c5_y = NULL;
  for(c5_i81 = 0; c5_i81 < 2; c5_i81 = c5_i81 + 1) {
    c5_b_u[c5_i81].re = (*(creal_T (*)[2])c5_u)[c5_i81].re;
    c5_b_u[c5_i81].im = (*(creal_T (*)[2])c5_u)[c5_i81].im;
  }
  c5_b_y = NULL;
  sf_mex_assign(&c5_b_y, sf_mex_create(&c5_b_u, "y", 0, 1U, 1U, 2, 1, 2));
  sf_mex_assign(&c5_y, c5_b_y);
  return c5_y;
}

static const mxArray *c5_n_sf_marshall(void *c5_chartInstance, void *c5_u)
{
  const mxArray *c5_y = NULL;
  int32_T c5_i82;
  int32_T c5_i83;
  creal_T c5_b_u[96];
  const mxArray *c5_b_y = NULL;
  c5_y = NULL;
  for(c5_i82 = 0; c5_i82 < 2; c5_i82 = c5_i82 + 1) {
    for(c5_i83 = 0; c5_i83 < 48; c5_i83 = c5_i83 + 1) {
      c5_b_u[c5_i83 + 48 * c5_i82].re = (*(creal_T (*)[96])c5_u)[c5_i83 + 48 *
        c5_i82].re;
      c5_b_u[c5_i83 + 48 * c5_i82].im = (*(creal_T (*)[96])c5_u)[c5_i83 + 48 *
        c5_i82].im;
    }
  }
  c5_b_y = NULL;
  sf_mex_assign(&c5_b_y, sf_mex_create(&c5_b_u, "y", 0, 1U, 1U, 2, 48, 2));
  sf_mex_assign(&c5_y, c5_b_y);
  return c5_y;
}

const mxArray *sf_c5_std5_get_eml_resolved_functions_info(void)
{
  const mxArray *c5_nameCaptureInfo = NULL;
  c5_nameCaptureInfo = NULL;
  sf_mex_assign(&c5_nameCaptureInfo, sf_mex_create(NULL, "nameCaptureInfo", 0,
    0U, 1U, 2, 0, 1));
  return c5_nameCaptureInfo;
}

static real_T *c5_PilotSubcSymbols(void)
{
  return (real_T *)ssGetInputPortSignal(chartInstance.S, 0);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -