Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Arrays/Stata/arrays-1.stata
Normal file
8
Task/Arrays/Stata/arrays-1.stata
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
matrix a = 2,9,4\7,5,3\6,1,8
|
||||
display det(a)
|
||||
matrix svd u d v = a
|
||||
matrix b = u*diag(d)*v'
|
||||
matrix list b
|
||||
* store the u and v matrices in the current dataset
|
||||
svmat u
|
||||
svmat v
|
||||
7
Task/Arrays/Stata/arrays-2.stata
Normal file
7
Task/Arrays/Stata/arrays-2.stata
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue