Gaussian Function and Matrix

1. Function

 

When

 

 

 

 

If

 

 

Else if

 

2. Matrix

(1) 5 by 5

 

(2) 6 by 6

 

 

(3) 7 by 7