Here everyone,
In the following loop in Mata, I generate three matrices, which I would like to use subsequently once the loop is executed:
mata
for(i=1;i<=3;i++) {
X = uniform(5,5)
Yi=i*X
st_matrix("Yi",Yi)
Yi
}
end
Then, I would like to use the resulting matrices. However, it seems that the matrices are not stored correctly. I cannot even call them. For instance, if I want just to list one of those, let say, Y2, I get the following message:
matlist Y2
Y2 not found
r(111)
Does anyone know how to deal with this issue?
Best regards
Abel
In the following loop in Mata, I generate three matrices, which I would like to use subsequently once the loop is executed:
mata
for(i=1;i<=3;i++) {
X = uniform(5,5)
Yi=i*X
st_matrix("Yi",Yi)
Yi
}
end
Then, I would like to use the resulting matrices. However, it seems that the matrices are not stored correctly. I cannot even call them. For instance, if I want just to list one of those, let say, Y2, I get the following message:
matlist Y2
Y2 not found
r(111)
Does anyone know how to deal with this issue?
Best regards
Abel
Comment