gaussmat.mBack to Contents<< Prev |  Next >> 

gaussmat
Normalized square Gaussian matrix.

Description
M = gaussmat(SIGMA) returns a 2D normalized Gaussian of width SIGMA. 
The size N of the matrix M is chosen by default as N=CEIL(SIGMA*2)*2+1. 
The matrix M is normalized, such that SUM(SUM(M))=1. 
 
M = gaussmat(SIGMA, N) does the same, but constrains the size of the 
matrix M to be N*N. Typical values for N are around 3 to 10 times 
SIGMA. It is better to choose an odd value for N, so that the central 
matrix element is the maximum of the Gaussian. 
 
gaussmat(0) returns 1. 
 
Examples: imagesc(gaussmat(3)); 
 
          s=vec2scal(loadvec('B00001.vec'),'norm'); 
          s.w=conv2(s.w,gaussmat(1.3),'same'); 
          showscal(s); 
 
F. Moisy 
Revision: 1.05,  Date: 2005/09/03 
 
See Also
filterf, addnoisef, CONV2. 

 Previous: filterfNext: getfilenum 

Help file generated by m2html 1.06