mat := cmat.NewFloatMatrix(3, 2) mat.Set(0, 0, 1.0) mat.Set(0, 1, 2.0) mat.Set(1, 0, 3.0) mat.Set(1, 1, 4.0) mat.Set(2, 0, 5.0) mat.Set(2, 1, 6.0)
submat := mat.Get(0, 1, 2, 1)This creates a new matrix that contains the elements (2.0, 4.0, 6.0) from the original matrix. Overall, the FloatMatrix type and associated methods provide a convenient and efficient way to work with matrices of floating-point numbers, which can be useful in a wide range of applications such as machine learning, simulation, and scientific computing.