📄 c4_new10.c
字号:
/* Include files */
#include "new10_sfun.h"
#include "c4_new10.h"
#define CHARTINSTANCE_CHARTNUMBER (chartInstance.chartNumber)
#define CHARTINSTANCE_INSTANCENUMBER (chartInstance.instanceNumber)
#include "new10_sfun_debug_macros.h"
/* Type Definitions */
/* Named Constants */
#define c4_IN_NO_ACTIVE_CHILD (0)
/* Variable Declarations */
/* Variable Definitions */
static SFc4_new10InstanceStruct chartInstance;
/* Function Declarations */
static void initialize_c4_new10(void);
static void initialize_params_c4_new10(void);
static void enable_c4_new10(void);
static void disable_c4_new10(void);
static void finalize_c4_new10(void);
static void sf_c4_new10(void);
static void c4_eML_blk_kernel(real_T *c4_b_u, real_T *c4_b_a, real_T c4_b_b,
real_T c4_b_c, real_T *c4_b_y);
static const mxArray *c4_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_b_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_c_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_d_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_e_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_f_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_g_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_h_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_i_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_j_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_k_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_l_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_m_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_n_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_o_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_p_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_q_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_r_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_s_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_t_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_u_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_v_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_w_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_x_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_y_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_ab_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static const mxArray *c4_bb_sf_marshall(void *c4_chartInstance, void *c4_b_u);
static real_T *c4_u(void);
static real_T *c4_y(void);
static real_T *c4_a(void);
static real_T *c4_b(void);
static real_T *c4_c(void);
static void init_dsm_address_info(void);
/* Function Definitions */
static void initialize_c4_new10(void)
{
_sfTime_ = (real_T)ssGetT(chartInstance.S);
chartInstance.c4_is_active_c4_new10 = 0U;
}
static void initialize_params_c4_new10(void)
{
}
static void enable_c4_new10(void)
{
}
static void disable_c4_new10(void)
{
}
static void finalize_c4_new10(void)
{
}
static void sf_c4_new10(void)
{
int32_T c4_i0;
int32_T c4_i1;
int32_T c4_i2;
uint8_T c4_previousEvent;
int32_T c4_i3;
real_T c4_dv0[1025];
int32_T c4_i4;
real_T c4_dv1[32];
real_T c4_dv2[34];
int32_T c4_i5;
_sfTime_ = (real_T)ssGetT(chartInstance.S);
for(c4_i0 = 0; c4_i0 < 1025; c4_i0 = c4_i0 + 1) {
_SFD_DATA_RANGE_CHECK(c4_u()[c4_i0], 4U);
}
for(c4_i1 = 0; c4_i1 < 34; c4_i1 = c4_i1 + 1) {
_SFD_DATA_RANGE_CHECK(c4_y()[c4_i1], 3U);
}
for(c4_i2 = 0; c4_i2 < 32; c4_i2 = c4_i2 + 1) {
_SFD_DATA_RANGE_CHECK(c4_a()[c4_i2], 0U);
}
_SFD_DATA_RANGE_CHECK(*c4_b(), 2U);
_SFD_DATA_RANGE_CHECK(*c4_c(), 1U);
c4_previousEvent = _sfEvent_;
_sfEvent_ = CALL_EVENT;
_SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG,2);
for(c4_i3 = 0; c4_i3 < 1025; c4_i3 = c4_i3 + 1) {
c4_dv0[c4_i3] = c4_u()[c4_i3];
}
for(c4_i4 = 0; c4_i4 < 32; c4_i4 = c4_i4 + 1) {
c4_dv1[c4_i4] = c4_a()[c4_i4];
}
c4_eML_blk_kernel((real_T *)c4_dv0, (real_T *)c4_dv1, *c4_b(), *c4_c(),
(real_T *)c4_dv2);
for(c4_i5 = 0; c4_i5 < 34; c4_i5 = c4_i5 + 1) {
c4_y()[c4_i5] = c4_dv2[c4_i5];
}
_SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG,2);
_sfEvent_ = c4_previousEvent;
sf_debug_check_for_state_inconsistency(_new10MachineNumber_,
chartInstance.chartNumber, chartInstance.instanceNumber);
}
static void c4_eML_blk_kernel(real_T *c4_b_u, real_T *c4_b_a, real_T c4_b_b,
real_T c4_b_c, real_T *c4_b_y)
{
real_T c4_threshold;
real_T c4_Delt;
real_T c4_Mean;
real_T c4_MaxAmpSum;
real_T c4_MaxAmpNum[100];
real_T c4_MaxAmp[100];
real_T c4_Delt_part;
real_T c4_counter3;
real_T c4_counter2;
real_T c4_counter1;
real_T c4_counter0;
real_T c4_Input_tem[1025];
real_T c4_Matrix_DeltMean;
real_T c4_Matrix_DeltSum;
real_T c4_u4_tem;
real_T c4_u2_tem;
real_T c4_flag;
real_T c4_i;
real_T c4_Forward4;
real_T c4_Forward2;
real_T c4_Matrix_Delt[32];
real_T c4_fhnum;
real_T c4_dv3[32];
int32_T c4_i6;
real_T c4_A;
real_T c4_x;
int32_T c4_i7;
int32_T c4_i8;
int32_T c4_i9;
real_T c4_b_A;
real_T c4_b_x;
real_T c4_c_A;
real_T c4_c_x;
real_T c4_d_A;
real_T c4_d_x;
real_T c4_B;
int32_T c4_i10;
static char c4_cv0[31] = { 'E', 'm', 'b', 'e', 'd', 'd', 'e', 'd', 'M', 'A',
'T', 'L', 'A', 'B', ':', 's', 'q', 'r', 't', ':', 'd',
'o', 'm', 'a', 'i', 'n', 'E', 'r', 'r', 'o', 'r' };
char c4_c_u[31];
const mxArray *c4_c_y = NULL;
int32_T c4_i11;
static char c4_cv1[77] = { 'D', 'o', 'm', 'a', 'i', 'n', ' ', 'e', 'r', 'r',
'o', 'r', '.', ' ', 'T', 'o', ' ', 'c', 'o', 'm', 'p',
'u', 't', 'e', ' ', 'c', 'o', 'm', 'p', 'l', 'e', 'x', ' ', 'r', 'e', 's',
'u', 'l', 't', 's', ' ', 'f',
'r', 'o', 'm', ' ', 'r', 'e', 'a', 'l', ' ', 'x', ',', ' ', 'u', 's', 'e',
' ', '\'', 's', 'q', 'r', 't'
, '(', 'c', 'o', 'm', 'p', 'l', 'e', 'x', '(', 'x', ')', ')', '\'', '.' };
char c4_d_u[77];
const mxArray *c4_d_y = NULL;
real_T c4_e_x;
real_T c4_e_y;
real_T c4_f_y;
real_T c4_dv4[34];
int32_T c4_i12;
sf_debug_symbol_scope_push(27U, 0U);
sf_debug_symbol_scope_add("threshold", &c4_threshold, c4_bb_sf_marshall);
sf_debug_symbol_scope_add("Delt", &c4_Delt, c4_ab_sf_marshall);
sf_debug_symbol_scope_add("Mean", &c4_Mean, c4_y_sf_marshall);
sf_debug_symbol_scope_add("MaxAmpSum", &c4_MaxAmpSum, c4_x_sf_marshall);
sf_debug_symbol_scope_add("MaxAmpNum", &c4_MaxAmpNum, c4_w_sf_marshall);
sf_debug_symbol_scope_add("MaxAmp", &c4_MaxAmp, c4_v_sf_marshall);
sf_debug_symbol_scope_add("Delt_part", &c4_Delt_part, c4_u_sf_marshall);
sf_debug_symbol_scope_add("counter3", &c4_counter3, c4_t_sf_marshall);
sf_debug_symbol_scope_add("counter2", &c4_counter2, c4_s_sf_marshall);
sf_debug_symbol_scope_add("counter1", &c4_counter1, c4_r_sf_marshall);
sf_debug_symbol_scope_add("counter0", &c4_counter0, c4_q_sf_marshall);
sf_debug_symbol_scope_add("Input_tem", &c4_Input_tem, c4_p_sf_marshall);
sf_debug_symbol_scope_add("Matrix_DeltMean", &c4_Matrix_DeltMean,
c4_o_sf_marshall);
sf_debug_symbol_scope_add("Matrix_DeltSum", &c4_Matrix_DeltSum,
c4_n_sf_marshall);
sf_debug_symbol_scope_add("u4_tem", &c4_u4_tem, c4_m_sf_marshall);
sf_debug_symbol_scope_add("u2_tem", &c4_u2_tem, c4_l_sf_marshall);
sf_debug_symbol_scope_add("flag", &c4_flag, c4_k_sf_marshall);
sf_debug_symbol_scope_add("i", &c4_i, c4_j_sf_marshall);
sf_debug_symbol_scope_add("Forward4", &c4_Forward4, c4_i_sf_marshall);
sf_debug_symbol_scope_add("Forward2", &c4_Forward2, c4_h_sf_marshall);
sf_debug_symbol_scope_add("Matrix_Delt", &c4_Matrix_Delt, c4_g_sf_marshall);
sf_debug_symbol_scope_add("fhnum", &c4_fhnum, c4_f_sf_marshall);
sf_debug_symbol_scope_add("y", c4_b_y, c4_e_sf_marshall);
sf_debug_symbol_scope_add("c", &c4_b_c, c4_d_sf_marshall);
sf_debug_symbol_scope_add("b", &c4_b_b, c4_c_sf_marshall);
sf_debug_symbol_scope_add("a", c4_b_a, c4_b_sf_marshall);
sf_debug_symbol_scope_add("u", c4_b_u, c4_sf_marshall);
CV_EML_FCN(0, 0);
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,2);
c4_fhnum = c4_b_u[1024];
/* frequency hopping numbers */
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,3);
c4_dv3[0] = c4_b_a[0];
c4_dv3[1] = c4_b_a[1];
c4_dv3[2] = c4_b_a[2];
c4_dv3[3] = c4_b_a[3];
c4_dv3[4] = c4_b_a[4];
c4_dv3[5] = c4_b_a[5];
c4_dv3[6] = c4_b_a[6];
c4_dv3[7] = c4_b_a[7];
c4_dv3[8] = c4_b_a[8];
c4_dv3[9] = c4_b_a[9];
c4_dv3[10] = c4_b_a[10];
c4_dv3[11] = c4_b_a[11];
c4_dv3[12] = c4_b_a[12];
c4_dv3[13] = c4_b_a[13];
c4_dv3[14] = c4_b_a[14];
c4_dv3[15] = c4_b_a[15];
c4_dv3[16] = c4_b_a[16];
c4_dv3[17] = c4_b_a[17];
c4_dv3[18] = c4_b_a[18];
c4_dv3[19] = c4_b_a[19];
c4_dv3[20] = c4_b_a[20];
c4_dv3[21] = c4_b_a[21];
c4_dv3[22] = c4_b_a[22];
c4_dv3[23] = c4_b_a[23];
c4_dv3[24] = c4_b_a[24];
c4_dv3[25] = c4_b_a[25];
c4_dv3[26] = c4_b_a[26];
c4_dv3[27] = c4_b_a[27];
c4_dv3[28] = c4_b_a[28];
c4_dv3[29] = c4_b_a[29];
c4_dv3[30] = c4_b_a[30];
c4_dv3[31] = c4_b_a[31];
for(c4_i6 = 0; c4_i6 < 32; c4_i6 = c4_i6 + 1) {
c4_Matrix_Delt[c4_i6] = c4_dv3[c4_i6];
}
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,4);
c4_Forward2 = c4_b_b;
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,5);
c4_Forward4 = c4_b_c;
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,6);
c4_i = 1.0;
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,7);
c4_flag = 0.0;
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,8);
c4_u2_tem = 0.0;
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,9);
c4_u4_tem = 0.0;
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,10);
c4_Matrix_DeltSum = 0.0;
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,11);
c4_Matrix_DeltMean = 0.0;
while(CV_EML_WHILE(0, 0, c4_i < 33.0)) {
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,13);
if(CV_EML_IF(0, 0,
c4_Matrix_Delt[(int32_T)_SFD_EML_ARRAY_BOUNDS_CHECK("Matrix_Delt",
(int32_T)_SFD_INTEGER_CHECK("i", c4_i), 1, 32
, 1) - 1] == 0.0)) {
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,14);
c4_flag = c4_flag + 1.0;
}
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,16);
c4_Matrix_DeltSum = c4_Matrix_DeltSum +
c4_Matrix_Delt[(int32_T)_SFD_EML_ARRAY_BOUNDS_CHECK("Matrix_Delt",
(int32_T)
_SFD_INTEGER_CHECK("i", c4_i), 1, 32, 1) - 1];
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,17);
c4_i = c4_i + 1.0;
}
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,19);
c4_A = c4_Matrix_DeltSum;
c4_x = c4_A;
c4_Matrix_DeltMean = c4_x / 32.0;
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,21);
for(c4_i7 = 0; c4_i7 < 1025; c4_i7 = c4_i7 + 1) {
c4_Input_tem[c4_i7] = c4_b_u[c4_i7];
}
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,22);
c4_counter0 = 1.0;
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,23);
c4_counter1 = 1.0;
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,24);
c4_counter2 = 1.0;
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,25);
c4_counter3 = 1.0;
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,26);
c4_Delt_part = 0.0;
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,27);
for(c4_i8 = 0; c4_i8 < 100; c4_i8 = c4_i8 + 1) {
c4_MaxAmp[c4_i8] = 0.0;
}
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,28);
for(c4_i9 = 0; c4_i9 < 100; c4_i9 = c4_i9 + 1) {
c4_MaxAmpNum[c4_i9] = 0.0;
}
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,29);
c4_MaxAmpSum = 0.0;
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,30);
c4_Mean = 0.0;
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,31);
c4_Delt = 0.0;
while(CV_EML_WHILE(0, 1, c4_counter0 < 101.0)) {
while(CV_EML_WHILE(0, 2, c4_counter1 < 1025.0)) {
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,34);
if(CV_EML_IF(0, 1,
c4_Input_tem[(int32_T)_SFD_EML_ARRAY_BOUNDS_CHECK("Input_tem",
(int32_T)_SFD_INTEGER_CHECK("counter1",
c4_counter1), 1, 1025, 1) - 1] >
c4_MaxAmp[(int32_T)_SFD_EML_ARRAY_BOUNDS_CHECK("MaxAmp",
(int32_T)_SFD_INTEGER_CHECK("counter0",
c4_counter0), 1, 100, 1) - 1])) {
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,35);
c4_MaxAmp[(int32_T)_SFD_EML_ARRAY_BOUNDS_CHECK("MaxAmp",
(int32_T)_SFD_INTEGER_CHECK("counter0", c4_counter0), 1, 100, 1) - 1] =
c4_Input_tem[(int32_T)_SFD_EML_ARRAY_BOUNDS_CHECK("Input_tem",
(int32_T)_SFD_INTEGER_CHECK("counter1", c4_counter1), 1, 1025, 1) - 1
];
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,36);
c4_MaxAmpNum[(int32_T)_SFD_EML_ARRAY_BOUNDS_CHECK("MaxAmpNum",
(int32_T)_SFD_INTEGER_CHECK("counter0", c4_counter0), 1, 100, 1) - 1]
= c4_counter1;
}
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,38);
c4_counter1 = c4_counter1 + 1.0;
}
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,40);
if(CV_EML_IF(0, 2,
c4_MaxAmpNum[(int32_T)_SFD_EML_ARRAY_BOUNDS_CHECK("MaxAmpNum",
(int32_T)_SFD_INTEGER_CHECK("counter0",
c4_counter0), 1, 100, 1) - 1] != 0.0)) {
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,41);
c4_Input_tem[(int32_T)_SFD_EML_ARRAY_BOUNDS_CHECK("Input_tem",
(int32_T)_SFD_INTEGER_CHECK("", c4_MaxAmpNum[(int32_T)
_SFD_EML_ARRAY_BOUNDS_CHECK("MaxAmpNum",
(int32_T)_SFD_INTEGER_CHECK("counter0", c4_counter0), 1, 100, 1) - 1]),
1, 1025, 1) - 1] =
0.0;
}
_SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,43);
c4_MaxAmpSum = c4_MaxAmpSum +
c4_MaxAmp[(int32_T)_SFD_EML_ARRAY_BOUNDS_CHECK("MaxAmp",
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -