Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
interfaces
matlab
examples
mexfiles
simple_function.cpp
Go to the documentation of this file.
1
35
#include <
acado_toolkit.hpp
>
// Include the ACADO toolkit
36
#include <
acado/utils/matlab_acado_utils.hpp
>
// Include specific Matlab utils
37
38
USING_NAMESPACE_ACADO
// Open the namespace
39
40
void
mexFunction
(
int
nlhs, mxArray *plhs[],
int
nrhs,
const
mxArray *prhs[] )
// Start the MEX function. Do NOT change the header of this function.
41
{
42
clearAllStaticCounters
( );
// Clear software counters
43
44
45
46
DifferentialState
x;
47
IntermediateState
z;
48
TIME
t;
49
Function
f;
50
51
z = 0.5*x + 1.0 ;
52
53
f <<
exp
(x) + t ;
54
f <<
exp
(z+
exp
(z)) ;
55
56
printf(
"the dimension of f is %d \n"
, f.
getDim
() );
57
printf(
"f depends on %d states \n"
, f.
getNX
() );
58
printf(
"f depends on %d controls \n"
, f.
getNU
() );
59
60
if
( f.
isConvex
() ==
BT_TRUE
)
61
printf(
"all components of function f are convex. \n"
);
62
63
64
65
clearAllStaticCounters
( );
// Clear software counters
66
}
67
DifferentialState
Definition:
variable_types.hpp:79
Function
Allows to setup and evaluate a general function based on SymbolicExpressions.
Definition:
function_.hpp:59
acado_toolkit.hpp
USING_NAMESPACE_ACADO
#define USING_NAMESPACE_ACADO
Definition:
acado_namespace_macros.hpp:59
TIME
Definition:
variable_types.hpp:175
Function::getNU
int getNU() const
Definition:
function.cpp:222
IntermediateState
Definition:
variable_types.hpp:184
matlab_acado_utils.hpp
mexFunction
USING_NAMESPACE_ACADO void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Definition:
simple_function.cpp:40
Function::getDim
int getDim() const
Function::isConvex
BooleanType isConvex()
Definition:
function.cpp:378
clearAllStaticCounters
returnValue clearAllStaticCounters()
Definition:
acado_syntax.cpp:248
BT_TRUE
#define BT_TRUE
Definition:
acado_types.hpp:47
Function::getNX
int getNX() const
Definition:
function.cpp:207
exp
IntermediateState exp(const Expression &arg)
Definition:
acado_syntax.cpp:49
acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:04