Compatibility fix with MATLAB ≤ R2011a
parent
f4b95d3aa5
commit
58adbdeddd
|
@ -1716,11 +1716,12 @@ DynamicModel::writeDynamicCFile(const string &basename, const int order) const
|
|||
<< " */" << endl
|
||||
<< "#include <math.h>" << endl;
|
||||
|
||||
mDynamicModelFile << "#include <stdlib.h>" << endl;
|
||||
|
||||
if (external_functions_table.get_total_number_of_unique_model_block_external_functions())
|
||||
// External Matlab function, implies Dynamic function will call mex
|
||||
mDynamicModelFile << "#include \"mex.h\"" << endl;
|
||||
else
|
||||
mDynamicModelFile << "#include <stdlib.h>" << endl;
|
||||
mDynamicModelFile << "#include <uchar.h>" << endl // For MATLAB ≤ R2011a
|
||||
<< "#include \"mex.h\"" << endl;
|
||||
|
||||
mDynamicModelFile << "#define max(a, b) (((a) > (b)) ? (a) : (b))" << endl
|
||||
<< "#define min(a, b) (((a) > (b)) ? (b) : (a))" << endl;
|
||||
|
@ -1756,6 +1757,7 @@ DynamicModel::writeDynamicCFile(const string &basename, const int order) const
|
|||
<< " */" << endl
|
||||
<< endl
|
||||
<< "#include <stdlib.h>" << endl
|
||||
<< "#include <uchar.h>" << endl // For MATLAB ≤ R2011a
|
||||
<< "#include \"mex.h\"" << endl
|
||||
<< endl
|
||||
<< "const int ntt = " << ntt << ";" << endl
|
||||
|
|
|
@ -2026,11 +2026,12 @@ StaticModel::writeStaticCFile(const string &basename) const
|
|||
<< " */" << endl
|
||||
<< "#include <math.h>" << endl;
|
||||
|
||||
output << "#include <stdlib.h>" << endl;
|
||||
|
||||
if (external_functions_table.get_total_number_of_unique_model_block_external_functions())
|
||||
// External Matlab function, implies Static function will call mex
|
||||
output << "#include \"mex.h\"" << endl;
|
||||
else
|
||||
output << "#include <stdlib.h>" << endl;
|
||||
output << "#include <uchar.h>" << endl // For MATLAB ≤ R2011a
|
||||
<< "#include \"mex.h\"" << endl;
|
||||
|
||||
output << "#define max(a, b) (((a) > (b)) ? (a) : (b))" << endl
|
||||
<< "#define min(a, b) (((a) > (b)) ? (b) : (a))" << endl;
|
||||
|
@ -2065,6 +2066,7 @@ StaticModel::writeStaticCFile(const string &basename) const
|
|||
<< " */" << endl
|
||||
<< endl
|
||||
<< "#include <stdlib.h>" << endl
|
||||
<< "#include <uchar.h>" << endl // For MATLAB ≤ R2011a
|
||||
<< "#include \"mex.h\"" << endl
|
||||
<< endl
|
||||
<< "const int ntt = " << ntt << ";" << endl
|
||||
|
|
Loading…
Reference in New Issue