Representation of affine functions in the form F*x + g
L = AffFunction(F,g)
L = AffFunction(F)
L = AffFunction(F,g,Data)
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. |
L | AffFunction object. |
L = AffFunction(3,1)
Affine Function: R^1 -> R^1Construct linear function
k = AffFunction(2*pi)
Affine Function: R^1 -> R^1
F = AffFunction([1 2;3 4],[1; -1])
Affine Function: R^2 -> R^2
data.x = 0:0.01:0.5;
data.y = sin(data.x);
data.file= 'DSCa001';Compute the regression coefficients and store them in h
h = polyfit(data.x,data.y,1);We can store the data from which the function was obtained under Data property
A=AffFunction(h(1),h(2),data)
Affine Function: R^1 -> R^1
◀ | mpt | display | ▶ |
© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch