Skip to content

Commit

Permalink
Matrix library, example #6
Browse files Browse the repository at this point in the history
  • Loading branch information
tisnik committed Dec 23, 2019
1 parent f8845bd commit 458826d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lesson7/gonum/mat06.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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)
}

for i := 1; i <= 5; i++ {
fmt.Println(mat.Formatted(big, mat.Prefix(" "), mat.Excerpt(i)))
fmt.Println()
}
}

0 comments on commit 458826d

Please sign in to comment.