Matrix Node
These sample projects show several examples to perform matrix operations.
Addition
Brain: Matrix/Matrix_Addition
Brain file with several examples of the addition operation. It contains :
- Summation of matrix and number. The number is defined as a memory block as well as
Params\DataInput0parameter. - Row or column wise addition of vector and matrix.
- Summation of two matrices. The
JoinNodecontains operation for addition of two matrices too. Thus, the example shows comparison of these two methods. Output of theMatrixNodeand theJoinNodeare compared in the newJoinNodeusing theDistanceSquaredoperation. The difference (visualized using the observer) is zero.
Note that dimensions (number of rows and columns) of all inputs must always make sense, thus the correct operation will performed.
Multiplication
Brain: Matrix/Matrix_Addition
Brain file with several multiplication examples. Again, note that dimension of inputs has to correspond to the desired operation with matrices. The sample project contains examples with:
- Vector times number
- Vector time matrix
- Matrix times matrix. Again, the
JoinNodecontains operation for matrix multiplication too. The example shows comparison of these two methods. Output of theMatrixNodeand theJoinNodeare compared in the newJoinNodeusing theDistanceSquaredoperation. The difference (visualized using the observer) is zero.
Log, Exp, Round
Brain: Matrix/Matrix_Addition
Examples with Round, Exp, Log operations on the matrix. Note that only one input is used in this case. The MatrixNode now applied desired function on that input MemoryBlock.
Get Row / Column
Brain: Matrix/Matrix_Addition
This brain file sample shows how to use the MatrixNode for getting the desired row or column of the matrix. The input is matrix and id of the row or the column (which row/column I want to get). The observers in the figure bellow show an example where we want to get row id ,,1'' (that is the second row because counting starts with 0). The matrix is shown in the middle observer. The result (node's output) is shown in the last observer.
