stata matrix to Mata?

#1
Hi
I have a matrix in Stata but i need to export it to Mata.
I've been reading abiut the issue i'm asking and i couldn't get a simple order to perform the operation i needed.
The stata matrix is named Data and has 17 rows and 3 columns.
Thanks for your time and interest.
 

maartenbuis

TS Contributor
#2
Code:
// create a rather boring Stata matrix
mat data = J(17,3,0)
// look at it
matlist data

// get it into Mata as the matrix mdata 
mata:
mdata = st_matrix("data")

// admire the boring Mata matrix
mdata
end