Hi everyone,
I have a quick "general" programming question when using mata. Why doesn't the mata describe command display all the working matrices/columns when placed in a function? Although it works fine when not in a function. I want to see a list of the matrices (and their dimensions) that I have to work with. For example, I use macro list and display when programming in Stata for reference. What would you use in place of this? Below is a silly example:
I have a quick "general" programming question when using mata. Why doesn't the mata describe command display all the working matrices/columns when placed in a function? Although it works fine when not in a function. I want to see a list of the matrices (and their dimensions) that I have to work with. For example, I use macro list and display when programming in Stata for reference. What would you use in place of this? Below is a silly example:
Code:
// Mata describe in a function mata: mata set matastrict on void calcextrema(string scalar varname) { real colvector x, cmm x = st_data(., varname) cmm = colminmax(x) } mata describe end sysuse auto, clear mata: calcextrema("price") // Mata describe not a function mata x = st_data(., "price") cmm = colminmax(x) mata describe end
Comment