Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Using scalars when defining matrices


From   Rachel <[email protected]>
To   statalist <[email protected]>
Subject   st: Using scalars when defining matrices
Date   Thu, 7 Dec 2006 19:48:30 -0500

I'm having trouble with the syntax of matrix define (or input) when
using scalars.  When I try the following:

scalar b3=2
matrix input Matrixnew=(1,`b3',`b3',`b3'\ `b3',1,0,0\ `b3',0,1,0\ `b3',0,0,1)

I get a syntax error even though I've put a space in between the
slashes and the scalars (per the manual) to avoid confusion.  What am
I doing wrong?

Thanks,
Rachel
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index