User Tools

Site Tools


eeros_architecture:control_system:available_blocks:gain

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
eeros_architecture:control_system:available_blocks:gain [2022/04/21 08:58] ursgrafeeros_architecture:control_system:available_blocks:gain [2022/04/21 13:35] – [Gain] ursgraf
Line 4: Line 4:
 The following lines show various examples. The following lines show various examples.
 <code cpp> <code cpp>
-Gain<Matrix<1,2>, Matrix<2,2>> g1({1,2.5,-1,-0.5});  // result will be of type Matrix<1,2>+Gain<Matrix<2,1>, Matrix<2,2>> g1({1,2.5,-1,-0.5});  // result will be of type Matrix<2,1>
 </code> </code>
-The first template parameter denotes the input signal. The gain here is a 2x2-matrix.+The first template parameter denotes the type of the input and output signal. The second template parameter is the type of the gain, which here is a 2x2-matrix.
 <code cpp> <code cpp>
-Gain<Matrix<2,1>, Matrix<2,2>> g1({1,2.5,-1,-0.5});  // not allowed+Gain<Matrix<1,2>, Matrix<2,2>> g1({1,2.5,-1,-0.5});  // not allowed, 2x2 matrix cannot be multiplied with 1x2 matrix
 </code> </code>
 This is not allowed because the multiplication of two matrices with the first having dimensions of [2,1] and the second of [2,2] is not defined.  This is not allowed because the multiplication of two matrices with the first having dimensions of [2,1] and the second of [2,2] is not defined. 
eeros_architecture/control_system/available_blocks/gain.txt · Last modified: 2022/04/21 13:36 by ursgraf