Curve fitter, how to start?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sergio
am 26 Feb. 2024
Kommentiert: Star Strider
am 26 Feb. 2024
Hi, I just imported curve fitter to the my MATLAB. I have these coordinates from the xls file , and I wish to import them directly in curve fitter. But that doesn't open it. Can this be done easily?
Any help appreciated
Thanks
0 Kommentare
Akzeptierte Antwort
Star Strider
am 26 Feb. 2024
Try this —
T1 = readtable('data.xlsx');
Var1 = str2double(cellfun(@(x)regexp(x, '\d*', 'match'), T1.Var1));
T1 = removevars(T1,'Var1');
T1 = addvars(T1, Var1, 'Before','Var2')
fitf1 = fit(T1.Var1, T1.Var2, 'poly1')
figure
plot(fitf1, T1.Var1, T1.Var2)
grid
fitf2 = fit(T1.Var1, T1.Var2, 'poly2')
figure
plot(fitf2, T1.Var1, T1.Var2)
grid
.
2 Kommentare
Star Strider
am 26 Feb. 2024
As always, my pleasure!
Not all the estimated parameters in the exponential or power functions were significantly different from zero (the confidence limits have opposite signs) so I only posted the models with significant parameters. (I tried several different models with 3 or fewer parameters, since there are only 4 data points, only models with 3 or fewer paramters will give reliable results in this instance.)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Curve Fitting Toolbox 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!