get mean and std from sfit object

18 Ansichten (letzte 30 Tage)
Reto Hofmann
Reto Hofmann am 1 Apr. 2014
Beantwortet: Reto Hofmann am 1 Apr. 2014
I use poly55 for fitting a surface to my measurement data. The result is a sfit object from which I can extract the coefficients with coeffvalues(fitresults):
% Set up fittype and options.
ft = fittype( 'poly55' );
% Fit model to data.
[fitresult, gof] = fit( [xData, yData], zData, ft, 'Normalize', 'on' );
In the command Windowc comes:
Linear model Poly55:
fitresult(x,y) = p00 + p10*x + p01*y + p20*x^2 + p11*x*y + p02*y^2
+ p30*x^3 + p21*x^2*y + p12*x*y^2 + p03*y^3 + p40*x^4
+ p31*x^3*y + p22*x^2*y^2 + p13*x*y^3 + p04*y^4 + p50*x^5
+ p41*x^4*y + p32*x^3*y^2 + p23*x^2*y^3 + p14*x*y^4
+ p05*y^5
where x is normalized by mean 948.8 and std 307.3
and where y is normalized by mean 474.7 and std 226.8
Coefficients (with 95% confidence bounds):
p00 = 3.329 (3.271, 3.386)
p10 = -0.7384 (-0.8502, -0.6267)
p01 = -13.96 (-14.08, -13.83)
p20 = 1.843 (1.762, 1.923)
p11 = -0.1893 (-0.2839, -0.09466)
p02 = -0.2026 (-0.3119, -0.0933)
p30 = 0.1761 (0.07422, 0.2779)
p21 = 0.971 (0.8428, 1.099)
p12 = 0.0674 (-0.06616, 0.201)
p03 = 0.1113 (-0.03479, 0.2573)
p40 = -0.1148 (-0.1391, -0.09059)
p31 = 0.02515 (-0.00647, 0.05677)
p22 = 0.06291 (0.02904, 0.09678)
p13 = 0.002115 (-0.03754, 0.04177)
p04 = 0.03172 (-0.01116, 0.0746)
p50 = -0.02834 (-0.05165, -0.005038)
p41 = -0.05022 (-0.08373, -0.01672)
p32 = 0.0001545 (-0.03869, 0.03899)
p23 = -0.01278 (-0.04958, 0.02402)
p14 = -0.003341 (-0.04329, 0.03661)
p05 = 0.03711 (-0.005346, 0.07957)
How can I extract the mean and the std? This has to be saved somewhere in this sfit object.

Akzeptierte Antwort

Reto Hofmann
Reto Hofmann am 1 Apr. 2014
I found the answer. Just calculate with mean(xData),mean(yData),std(xData),std(yData).

Weitere Antworten (0)

Kategorien

Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by