필터 지우기
필터 지우기

Gaussian residual analysis data extraction? Subpeak plotting.

조회 수: 5 (최근 30일)
Robert
Robert 2013년 5월 1일
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by