111 lines
2.0 KiB
C
111 lines
2.0 KiB
C
/*
|
|
* File: F_vctr_fcn.c
|
|
*
|
|
* MATLAB Coder version : 4.1
|
|
* C/C++ source code generated on : 25-Mar-2020 16:46:36
|
|
*/
|
|
|
|
/* Include Files */
|
|
#include "F_vctr_fcn.h"
|
|
|
|
/* Function Definitions */
|
|
|
|
/*
|
|
* F_VCTR_FCN
|
|
* TAU_FRCN = F_VCTR_FCN(IN1,IN2)
|
|
* Arguments : const double in1[6]
|
|
* const double in2[18]
|
|
* double tau_frcn[6]
|
|
* Return Type : void
|
|
*/
|
|
void F_vctr_fcn(const double in1[6], const double in2[18], double tau_frcn[6])
|
|
{
|
|
double x;
|
|
double b_x;
|
|
double c_x;
|
|
double d_x;
|
|
double e_x;
|
|
double f_x;
|
|
|
|
/* This function was generated by the Symbolic Math Toolbox version 8.2. */
|
|
/* 25-Mar-2020 14:56:46 */
|
|
x = in1[0];
|
|
if (in1[0] < 0.0) {
|
|
x = -1.0;
|
|
} else if (in1[0] > 0.0) {
|
|
x = 1.0;
|
|
} else {
|
|
if (in1[0] == 0.0) {
|
|
x = 0.0;
|
|
}
|
|
}
|
|
|
|
b_x = in1[1];
|
|
if (in1[1] < 0.0) {
|
|
b_x = -1.0;
|
|
} else if (in1[1] > 0.0) {
|
|
b_x = 1.0;
|
|
} else {
|
|
if (in1[1] == 0.0) {
|
|
b_x = 0.0;
|
|
}
|
|
}
|
|
|
|
c_x = in1[2];
|
|
if (in1[2] < 0.0) {
|
|
c_x = -1.0;
|
|
} else if (in1[2] > 0.0) {
|
|
c_x = 1.0;
|
|
} else {
|
|
if (in1[2] == 0.0) {
|
|
c_x = 0.0;
|
|
}
|
|
}
|
|
|
|
d_x = in1[3];
|
|
if (in1[3] < 0.0) {
|
|
d_x = -1.0;
|
|
} else if (in1[3] > 0.0) {
|
|
d_x = 1.0;
|
|
} else {
|
|
if (in1[3] == 0.0) {
|
|
d_x = 0.0;
|
|
}
|
|
}
|
|
|
|
e_x = in1[4];
|
|
if (in1[4] < 0.0) {
|
|
e_x = -1.0;
|
|
} else if (in1[4] > 0.0) {
|
|
e_x = 1.0;
|
|
} else {
|
|
if (in1[4] == 0.0) {
|
|
e_x = 0.0;
|
|
}
|
|
}
|
|
|
|
f_x = in1[5];
|
|
if (in1[5] < 0.0) {
|
|
f_x = -1.0;
|
|
} else if (in1[5] > 0.0) {
|
|
f_x = 1.0;
|
|
} else {
|
|
if (in1[5] == 0.0) {
|
|
f_x = 0.0;
|
|
}
|
|
}
|
|
|
|
tau_frcn[0] = (in2[2] + in2[0] * in1[0]) + in2[1] * x;
|
|
tau_frcn[1] = (in2[5] + in2[3] * in1[1]) + in2[4] * b_x;
|
|
tau_frcn[2] = (in2[8] + in2[6] * in1[2]) + in2[7] * c_x;
|
|
tau_frcn[3] = (in2[11] + in2[9] * in1[3]) + in2[10] * d_x;
|
|
tau_frcn[4] = (in2[14] + in2[12] * in1[4]) + in2[13] * e_x;
|
|
tau_frcn[5] = (in2[17] + in2[15] * in1[5]) + in2[16] * f_x;
|
|
}
|
|
|
|
/*
|
|
* File trailer for F_vctr_fcn.c
|
|
*
|
|
* [EOF]
|
|
*/
|