Added .mata sample for Stata.

Source: http://www.stata.com/help.cgi?m1_first
This commit is contained in:
mwhite-IPA
2014-03-19 17:35:15 -04:00
parent 8f02926d68
commit 27ea8d0bf5

8
samples/Stata/tanh.mata Normal file
View File

@@ -0,0 +1,8 @@
numeric matrix tanh(numeric matrix u)
{
numeric matrix eu, emu
eu = exp(u)
emu = exp(-u)
return( (eu-emu):/(eu+emu) )
}