Home > Scripts > Models > Factory > gaussnd.m

iFit/gaussnd

PURPOSE ^

y = gaussnd(p, x, y, ..., signal) : nD Gaussian

SYNOPSIS ^

function y=gaussnd(varargin)

DESCRIPTION ^

 y = gaussnd(p, x, y, ..., signal) : nD Gaussian

   iFunc/gaussnd nD Gaussian fitting function

     y = R0 * exp(-[x,y,...]' * G * [x,y,...]) 

 a multi-dimensional Gaussian profile
 <http://en.wikipedia.org/wiki/Gaussian_function#Multi-dimensional_Gaussian_function>

 This model has no background, is centered, and has maximum intensity set to 1.
 The parameters correspond to widths.

 gaussnd([w1 w2 ... wn ])
   builds a 'n' Dimensional orthogonal Gaussian with widths [w1 w2 ...]
 gaussnd(M)
   where M is a square matrix [n x n] builds a 'n' Dimensional.
   if M is non symmetric, it is made so from (M+M')/2
 gaussnd('ResLibCal') extracts a 4D TAS resolution function from ResLibCal
 gaussnd('defaults')
   builds a 2D Gaussian
 gaussnd
   shows a Dialogue to enter the Gaussian matrix, widths or other option.

 input:  p: Gaussian model matrix (double, symmetric ndims*ndims)
            p = [ ndims(G) * ndims(G) values ]
          or 'guess'
         x,y,...: axes (double)
         signal: when values are given and p='guess', a guess of the parameters is performed (double)
 output: y: model value
 ex:     y=gaussnd([1 0 1 1], -10:10, -10:10); or plot(gaussnd)

 Version: Aug. 22, 2017
 See also iFunc, iFunc/fits, iFunc/plot, gauss2d, gauss
 (c) E.Farhi, ILL. License: EUPL.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Tue 22-Aug-2017 11:03:30 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1