I know that I can create Matrix like this:

```
val values = Array(0.0, 1.0, 2.0, 3.0, 4.0, 5.0)
val mat = Matrices.dense(m, n, values).asInstanceOf[DenseMatrix]

```

But now I have a text file and it is a matrix like this:

```
0.0 1.0

2.0  3.0

4.0  5.0

```

I want to know how to create Matrix from this file.

Can I do this:

```
val test3=sc.textFile("textFile").map(_.split("\t").map(_.toDouble)).asInstanceOf[DenseMatrix]

```

But it seems doesn't work 

anyone help me?