RosettaCodeData/Task/Matrix-arithmetic/Go/matrix-arithmetic-4.go

18 lines
275 B
Go
Raw Permalink Normal View History

2017-09-23 10:01:46 +02:00
package main
import (
"fmt"
2018-06-22 20:57:24 +00:00
"gonum.org/v1/gonum/mat"
2017-09-23 10:01:46 +02:00
)
func main() {
2018-06-22 20:57:24 +00:00
fmt.Println(mat.Det(mat.NewDense(2, 2, []float64{
2017-09-23 10:01:46 +02:00
1, 2,
3, 4})))
2018-06-22 20:57:24 +00:00
fmt.Println(mat.Det(mat.NewDense(3, 3, []float64{
2017-09-23 10:01:46 +02:00
2, 9, 4,
7, 5, 3,
6, 1, 8})))
}