0
Need help this matlab function into Scilab [fitobject,gof,output] = fit(x,y,fitType)

Hi There,

I have this matlab function

[fitobject,gof,output] = fit(x,y,poly1)

This function is calculating many thing in back ground and I want few of the things in the scilab, i cannot do it by myself in scilab.

Can any body help me out

When I am evaluating this function [fitobject,gof,output] = fit(x,y,poly1) in Matlab then the folloing comeup (Please ignore the data and values)

fitobject =

Linear model Poly1:
fitobject(x) = p1*x + p2
Coefficients (with 95% confidence bounds):
p1 = -4.064 (-4.648, -3.479)
p2 = 46.9 (40.18, 53.62)

gof =

sse: 0.1796
rsquare: 0.9797
dfe: 6
adjrsquare: 0.9763
rmse: 0.1730


output =

numobs: 8
numparam: 2
residuals: [8x1 double]
Jacobian: [8x2 double]
exitflag: 1
algorithm: 'QR factorization and solve'
iterations: 1

So out of it I need the following in Scilab

Linear model Poly1:
fitobject(x) = p1*x + p2
Coefficients (with 95% confidence bounds):
p1 = -4.064 (-4.648, -3.479)
p2 = 46.9 (40.18, 53.62)

and

rsquare: 0.9797

and

ci=confint(fitobject,0.95)

Please guide me for this.

Regards


Scilab 05-12-19, 7:44 p.m. waqas.ahmed
0

Hello,

The fit command of Matlab is for "interactive curve fitting". In my opinion, leastsq function of Scilab should be able to help you. The optim function can also come handy.

Rupak

01-01-20, 11:39 a.m. rupakrokade


Log-in to answer to this question.