[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Returning a rowvector on-the-fly in Mata, as in -return(el1, el2, ...)-
Is is bad Mata programming practice to assemble a returned vector (or
matrix) inside the -return()- statement?
Stata won't let you -return matrix A = (element1, element2, . . .)-. In
Mata, on the other hand, it seems that you can do the analogous operation.
But that doesn't imply that you ought to.
Is it too-clever-for-your-own-good to, for example,
-return(element1, element2, . . .)-
-return( (element1, element2, . . .) )-
for a function that returns a row vector? (The elements are expressions,
i.e., literals, scalar variables, return functions, of the proper datatype.)
* For searches and help try: