Re: Save values of a matrix

8 views
Skip to first unread message

Marcel Luethi

unread,
Dec 23, 2020, 5:01:21 AM12/23/20
to Ilaria A., scalismo
Hi Ilaria

Yes, you can save a matrix as a csv file as follows:

val matrix = DenseMatrix.rand(10, 10)
val csvWriter = breeze.linalg.csvwrite(new java.io.File("afile.csv"), matrix)

You could also just restrict the output to a part of the matrix (in this case the first 10 rows and columns) as follows:
matrix(0 until 10, 0 until 10)

Best regards,

Marcel


On Tue, Dec 22, 2020 at 6:49 PM Ilaria A. <ilaria...@gmail.com> wrote:

Hello everybody,
I have a question: is there a way to save or export the values of a matrix (like basisMatrix) that I computed in ScalismoLab?
Because when I display a matrix in Scalismo it is  truncated but I need to see all values of my matrix.

Thanks in advance,
Ilaria

--
You received this message because you are subscribed to the Google Groups "scalismo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalismo+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalismo/43b49e85-ffce-4772-92c2-af2200209117n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages