Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Mata data question
From
[email protected]
To
[email protected]
Subject
st: Mata data question
Date
Mon, 01 Aug 2011 13:53:32 -0500
Benjamin Allaire <[email protected]> reported a problem with the
user-written -spmat- command. He noted that when the matrix and spmat object
share the same name, -spmat putmatrix- erases the matrix from Mata memory:
> Why doesn't this code work? Why does G go away?
> . spmat putmatrix G G, replace
> <istmt>: 3499 G not found
> r(3499);
tzygmund mcfarlane <[email protected]> correctly explained that
> issuing the replace option clears any previous matrix with given "objname"
> (in this case, "G") first and then tries to save "matname" (in this case,
> also "G") to that location.... So for example, this code will work:
> spmat putmatrix newobj G, replace
We will fix this issue in a future update to -spmat-.
--Rafal
[email protected]
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/