RosettaCodeData/Task/Arrays/Stata/arrays-2.stata
2023-07-01 13:44:08 -04:00

7 lines
179 B
Text

mata
a = 2,9,4\7,5,3\6,1,8
det(a)
svd(a, u=., s=., v=.)
// Notice that to reconstruct the matrix, v is not transposed here,
// while it is with -matrix svd- in Stata.
u*diag(s)*v