Dear Allin,
When I use matrix functions Gretl exhibits different behavior regarding column names and row names. Please take a look at the following script: <hansl> matrix Mat = {1, 2; 2, 1; 4, 1} strings Cols = defarray("Col. 1", "Col. 2") strings Rows = defarray("Row 1", "Row 2", "Row 3") colnames(Mat, Cols) rownames(Mat, Rows) matrix msortbyMat = msortby(Mat, 2) matrix mreverseMat = mreverse(Mat) print Mat print msortbyMat print mreverseMat </hansl> The msortby function keeps the names but the mreverse doesn't. Is this the expected behavior? Best regards, Henrique Andrade Sent from [Nylas N1](https://nylas.com/n1?ref=n1), the extensible, open source mail client.
Dear Allin,
When I use matrix functions Gretl exhibits different behavior regarding column names and row names. Please take a look at the following script:
<hansl>
matrix Mat = {1, 2; 2, 1; 4, 1}
strings Cols = defarray("Col. 1", "Col. 2")
strings Rows = defarray("Row 1", "Row 2", "Row 3")
colnames(Mat, Cols)
rownames(Mat, Rows)
matrix msortbyMat = msortby(Mat, 2)
matrix mreverseMat = mreverse(Mat)
strings Cols = defarray("Col. 1", "Col. 2")
strings Rows = defarray("Row 1", "Row 2", "Row 3")
colnames(Mat, Cols)
rownames(Mat, Rows)
matrix msortbyMat = msortby(Mat, 2)
matrix mreverseMat = mreverse(Mat)
print Mat
print msortbyMat
print mreverseMat
print msortbyMat
print mreverseMat
</hansl>
The msortby function keeps the names but the mreverse doesn't. Is this the expected behavior?
Best regards,
Henrique Andrade