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

st: Learning Mata: what is the best way?

From   [email protected]
To   [email protected]
Subject   st: Learning Mata: what is the best way?
Date   Wed, 23 Jan 2008 16:24:59 -0500


I have been programming for a couple of years in Stata (now using Stata/SE 9.2)
and I am currently deciding whether to learn Mata (or switch to something like
Matlab), so I have a couple of questions:

   What is the best way to learn Mata? I bought the books M[0-3] and M[4-6], but
   they are reference guides, not learning books. Is there not a book/website,
   etc. that shows more snippets of code so you can actually learn the language
   by example?
   I played around a bit, but I even failed to create something as elementary

function tryit()
 for (i==1; i<10; i++) printf("i=%g\n",i)

After writing this in the do editor and running it, I get the following error:

nothing found where 'while' expected

Alternatively, when I input it interactively and then call it with:


I get this error message:

tryit():  3200  conformability error
<istmt>:     -  function returned error

Not exactly your average "Hello World!" gratification, so your help would be
much appreciated!


*   For searches and help try:

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