Borrar filtros
Borrar filtros

Gaussian residual analysis data extraction? Subpeak plotting.

5 visualizaciones (últimos 30 días)
Robert
Robert el 1 de Mayo de 2013
Hi, I have some data that is made up of convoluted gaussian peaks (XPS C1s peak in fact) and I would like some help on plotting the subpeaks in an elegant manner and also extracting residual fit data and the fitted lineshape data.
My data is stored in X and Y data vectors.
I am applying a gaussian fit as follows (for 2 gaussian subpeaks):
fitdata = fit(x,y, 'gauss2' , fitoptions)
This gives me a decent envelope fit of the data.
I am then plotting the fit and residual fit in a subplot as follows:
plot(fitdata, x, y,'residuals')
My question is how can I get the data of the residual plot into X, Y form so I can perform further analysis (e.g. variance)? Simply I would do data-fitdata, however I cannot extract the X Y data of fitdata to do this.
So simply I suppose my question is how do I extract the X Y data from the results of the fit() function?
Also I am trying to plot the subpeaks of the gaussian fit. I am currently doing this by extracting the parameters contained in the datafit struct and applying them to gaussmf() to plot gaussian shapes, however it feels like there should be a more elegant way to do this. Is there?
Thanks in advance, Rob

Respuestas (0)

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by