RosettaCodeData/Task/Arrays/Stata/arrays-2.stata

8 lines
179 B
Plaintext

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