summaryrefslogtreecommitdiff
path: root/fit_image.m
blob: e682e4d37b6e56b85bbe97cafe6117bb1a88e9ec (plain)
1
2
3
4
5
6
7
8
9
10
11
function fit_params=fit_image(f,init_params,X,Y,img, pLowBound, pUpperBound, options)

%options = optimset('lsqnonlin');
%options.Display = 'iter';
%options.TolFun = tolerance;

fit_params  = lsqnonlin( ...
    @(p) Gaussian2D(p,X,Y) - img, ...
    init_params,pLowBound,pUpperBound,options ...
    );