mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Added .mata sample for Stata.
Source: http://www.stata.com/help.cgi?m1_first
This commit is contained in:
		
							
								
								
									
										8
									
								
								samples/Stata/tanh.mata
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								samples/Stata/tanh.mata
									
									
									
									
									
										Normal 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) ) | ||||||
|  | } | ||||||
		Reference in New Issue
	
	Block a user