March 2020
Intermediate to advanced
406 pages
8h 39m
English
A column vector is an m x 1 matrix, also known as the transpose of a row vector. A matrix transposition is when a matrix is flipped over its diagonal, often denoted with a superscript T. We can see an example of a column vector in the following image:

If we want to implement a column vector in Go, we can use the Gonum vector package to initialize this vector, as shown in the following code block:
package mainimport ( "fmt" "gonum.org/v1/gonum/mat")func main() { v := mat.NewVecDense(4, []float64{0, 1, 2, 3}) matPrint(v)}func matrixPrint(m mat.Matrix) { formattedMatrix := mat.Formatted(m, mat.Prefix(""), mat.Squeeze()) fmt.Printf("%v\n", ...Read now
Unlock full access