📄 x_4_c_wrapper.c
字号:
/*
*
* --- THIS FILE GENERATED BY S-FUNCTION BUILDER: 3.0 ---
*
* This file is a wrapper S-function produced by the S-Function
* Builder which only recognizes certain fields. Changes made
* outside these fields will be lost the next time the block is
* used to load, edit, and resave this file. This file will be overwritten
* by the S-function Builder block. If you want to edit this file by hand,
* you must change it only in the area defined as:
*
* %%%-SFUNWIZ_wrapper_XXXXX_Changes_BEGIN
* Your Changes go here
* %%%-SFUNWIZ_wrapper_XXXXXX_Changes_END
*
* For better compatibility with the Real-Time Workshop, the
* "wrapper" S-function technique is used. This is discussed
* in the Real-Time Workshop User's Manual in the Chapter titled,
* "Wrapper S-functions".
*
* Created: Thu Aug 18 00:32:00 2005
*/
/*
* Include Files
*
*/
#if defined(MATLAB_MEX_FILE)
#include "tmwtypes.h"
#include "simstruc_types.h"
#else
#include "rtwtypes.h"
#endif
/* %%%-SFUNWIZ_wrapper_includes_Changes_BEGIN --- EDIT HERE TO _END */
#include <math.h>
/* %%%-SFUNWIZ_wrapper_includes_Changes_END --- EDIT HERE TO _BEGIN */
#define u_width 4
#define y_width 1
/*
* Create external references here.
*
*/
/* %%%-SFUNWIZ_wrapper_externs_Changes_BEGIN --- EDIT HERE TO _END */
/* extern double func(double a); */
/* %%%-SFUNWIZ_wrapper_externs_Changes_END --- EDIT HERE TO _BEGIN */
/*
* Output functions
*
*/
void x_4_c_Outputs_wrapper(const creal_T *x,
creal_T *y1,
creal_T *y2,
creal_T *y3,
creal_T *y4)
{
/* %%%-SFUNWIZ_wrapper_Outputs_Changes_BEGIN --- EDIT HERE TO _END */
y1[0]=x[0];
y1[1].re=(-1)*x[1].re;
y1[1].im=(-1)*x[1].im;
y1[2].re=(-1)*x[2].re;
y1[2].im=(-1)*x[2].im;
y1[3].re=(-1)*x[3].re;
y1[3].im=(-1)*x[3].im;
y1[4].re=x[0].re;
y1[4].im=(-1)*x[0].im;
y1[5].re=(-1)*x[1].re;
y1[5].im=x[1].im;
y1[6].re=(-1)*x[2].re;
y1[6].im=x[2].im;
y1[7].re=(-1)*x[3].re;
y1[7].im=x[3].im;
y2[0]=x[1];
y2[1]=x[0];
y2[2]=x[3];
y2[3].re=x[2].re*(-1);
y2[3].im=x[2].im*(-1);
y2[4].re=x[1].re;
y2[4].im=x[1].im*(-1);
y2[5].re=x[0].re;
y2[5].im=x[0].im*(-1);
y2[6].re=x[3].re;
y2[6].im=x[3].im*(-1);
y2[7].re=x[2].re*(-1);
y2[7].im=x[2].im;
y3[0]=x[2];
y3[1].re=x[3].re*(-1);
y3[1].im=x[3].im*(-1);
y3[2]=x[0];
y3[3]=x[1];
y3[4].re=x[2].re;
y3[4].im=x[2].im*(-1);
y3[5].re=x[3].re*(-1);
y3[5].im=x[3].im;
y3[6].re=x[0].re;
y3[6].im=x[0].im*(-1);
y3[7].re=x[1].re;
y3[7].im=x[1].im*(-1);
y4[0]=x[3];
y4[1]=x[2];
y4[2].re=x[1].re*(-1);
y4[2].im=x[1].im*(-1);
y4[3]=x[0];
y4[4].re=x[3].re;
y4[4].im=x[3].im*(-1);
y4[5].re=x[2].re;
y4[5].im=x[2].im*(-1);
y4[6].re=x[1].re*(-1);
y4[6].im=x[1].im;
y4[7].re=x[0].re;
y4[7].im=x[0].im*(-1);
/* %%%-SFUNWIZ_wrapper_Outputs_Changes_END --- EDIT HERE TO _BEGIN */
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -