function [ parameters,lb,ub,conf,graphdata,resnorm,residual,r2 ] = DC( inputfile , varargin ) % DC( inputfile,'range',range input,'np',np input,'bg','IG',IG input,'mode',mode input ) % inputfile = Either: A string - 'filename.txt' % [x y] Matrix. % 'all' - Deconvolutes all *.txt files in folder. % range = Either: A vector - [minx maxx] % 'all' - full range % empty - will ask for range later % np = Number of peaks. % empty - will ask for the number later % bg = Type of Background % Either: bg0 - no background % bg1 - constant background (if empty - defult) % bg2 - sloped background, can't be lower % than 0. Fits 2 constants - one at the % beginning and one at the end. % bg3 - sloped backgroud, can be lower than % 0. Fits a constant at the beginning and a % slope. % s - shirley background. % IG = Initial Guess type. % Either: A matrix with all of the parameters: % [parameters;lower bound;high bound]; % 'auto' - auto peak suggestion % 'full' - auto peak suggestion with the ability to % change boundaries % empty - automatic generation (very bad) % mode = Base Function. % Either: 1 - Voigt: [a x0 nu sig] = [scale center shape(0=Lorentz