Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
+
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
x
y
+
Typedefs
a
d
i
p
q
r
s
t
Enumerations
+
Enumerator
a
b
c
d
e
f
g
h
i
l
n
o
p
r
s
t
u
v
w
x
z
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
+
Enumerator
_
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Related Functions
a
c
d
e
f
g
h
i
l
m
o
p
q
r
s
t
x
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
w
x
z
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
p
q
r
s
t
u
v
x
z
+
Typedefs
a
b
c
d
e
f
g
i
l
m
n
r
s
t
u
+
Enumerations
a
b
c
d
e
g
h
i
l
m
n
o
p
q
r
s
t
u
v
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
+
Macros
_
a
b
c
d
e
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
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
IntermediateState
Definition:
variable_types.hpp:184
matlab_acado_utils.hpp
Function::getNU
int getNU() const
Definition:
function.cpp:222
mexFunction
USING_NAMESPACE_ACADO void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Definition:
simple_function.cpp:40
Function::getNX
int getNX() const
Definition:
function.cpp:207
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::getDim
int getDim() const
exp
IntermediateState exp(const Expression &arg)
Definition:
acado_syntax.cpp:49
acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Feb 28 2022 21:32:09