Representation of quadratic functions in the form x'*H*x + F*x + g
Q = QuadFunction(H,F,g)
Q = QuadFunction(H,F)
Q = QuadFunction(H)
Q = QuadFunction(H,F,g,Data)
H |
Real matrix representing the coefficients in the quadratic term ![]() ![]() Class: double |
F |
Real matrix representing the coefficients in the linear term ![]() ![]() Class: double |
g |
Real vector representing the affine terms ![]() ![]() Class: double |
Data | Any data related to the function. |
Q | QuadFunction object. |
q1 = QuadFunction(1,0,1)
Quadratic Function: R^1 -> R^1Construct a quadratic function
q2 = QuadFunction(0.5,3,-1)
Quadratic Function: R^1 -> R^1
f = QuadFunction(randn(2),randn(1,2),randn(1))
Quadratic Function: R^2 -> R^1
data.x = 0:0.01:0.5;
data.y = cos(data.x);
data.file= 'DSCa002';Compute the regression coefficients and store them in h
h = polyfit(data.x,data.y,2);We can store the data from which the function was obtained under Data property
QuadFunction(h(1),h(2),h(3),data)
Quadratic Function: R^1 -> R^1
◀ | display | mpt | ▶ |
© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch