![curveFitting.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/194985/curveFitting.png)
Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
How can I find a fit for my data?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
phi = [ones(size(x2)),x2,x2.^2,x2.^3,x2.^4];
aa = phi\y2;
yfit = phi*aa;
plot(x2,y2,'bx',x2,yfit,'k-')
grid on
s=sprintf('y=%8f+%8fx+%8fx^2+%8fx^3+%8fx^4',aa(1),aa(2),aa(3),aa(4),aa(5));
legend('data',s);
cc = corrcoef(y2,yfit);
so I plotted the datas and is shown in blue crosses but the fit I found in black line is not accurate enough, how can I increase my fit accuracy?
Also I plotted data3 on a graph and notice its a trignometric function. But I dont know how to find a fit for this kind of graph.
0 Commenti
Risposte (1)
Cris LaPierre
il 14 Nov 2018
Also, there is a curve fitting app (if you have access to it).
![curveFitting.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/194985/curveFitting.png)
0 Commenti
Questa domanda è chiusa.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!