Skip to content

Commit

Permalink
Matrix library, example #5
Browse files Browse the repository at this point in the history
  • Loading branch information
tisnik committed Dec 23, 2019
1 parent ce5152f commit f8845bd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lesson7/gonum/mat05.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package main

import (
"fmt"
"gonum.org/v1/gonum/mat"
)

func main() {
big := mat.NewDense(100, 100, nil)
for i := 0; i < 100; i++ {
big.Set(i, i, 1)
}

fmt.Println(mat.Formatted(big, mat.Prefix(" "), mat.Excerpt(3)))
}

0 comments on commit f8845bd

Please sign in to comment.