求助!!!
static void argInit_1x11_real_T(double result){
int idx1;
//循环遍历数组以初始化每个元素
for (idx1 = 0; idx1 < 11; idx1++)
{
//设置数组元素的值,将此值更改为程序所需的值
result = argInit_real_T();
}
}
static void argInit_5x1_real_T(double result)
{
int idx0;
//循环遍历数组以初始化每个元素
for (idx0 = 0; idx0 < 5; idx0++)
{
//设置数组元素的值,将此值更改为程序所需的值
result = argInit_real_T();
}
}
static int argInit_int32_T(void)
{
//double result;
return 0;
}
static double argInit_real_T(void)
{
return 0.0;
}
static void main_Base(void)
{
double dv = {0,0,0,0,0.3972,0.4491,0.5389,1,1,1,1};
double ret;
argInit_1x11_real_T(dv);
ret = Base(argInit_int32_T(), dv, argInit_real_T());
//构造的函数:double Base(int i, const double u, double t);
}
想请教大家,我应该怎么改变argInit_int32_T(void)和argInit_real_T(void)这两个函数的返回值,才能使ret = Base(argInit_int32_T(), dv, argInit_real_T())不为0呢? Base(argInit_int32_T(), dv, argInit_real_T())
这个函数的定义呢? jackz007 发表于 2022-11-30 12:49
这个函数的定义呢?
double Base(int i,const double u, double t)
{
int qY;
double coeff2;
double coeff1;
double d;
isInitialized_ThreeS2 = false;
if (!isInitialized_ThreeS2)
{
ThreeS2_initialize();
}
/* 基函数的构造 */
if (i > 2147483644)
{
qY = MAX_int32_T;
}
else
{
qY = i + 3;
}
coeff2 = u;
if (u - coeff2 == 0.0)
{
coeff1 = 0.0;
}
else
{
coeff1 = (t - coeff2) / (u - coeff2);
}
coeff2 = u;
d = coeff2 - u;
if (d == 0.0)
{
coeff2 = 0.0;
}
else
{
coeff2 = (coeff2 - t) / d;
}
return coeff1 * b_Base(i, 2.0, u, t) + coeff2 * b_Base(i + 1, 2.0, u, t);
}
页:
[1]