manthanein 发表于 2019-6-30 21:43:35

如何拟合

数据似乎具有周期性,但我不知道如何拟合。

1        4.16
2        3.27
3        4.09
4        3.19
5        4.01
6        4.11
7        3.22
8        4.03
9        4.14
10        3.25
11        4.06
12        4.17
13        3.28
14        4.09
15        3.21
16        4.02
17        4.12
18        3.23
19        4.05
20        4.16
21        3.26
22        4.08
23        4.19
24        3.3
25        4.11
26        3.22
27        4.04

kastin 发表于 2019-7-1 13:43:29

可以试试三角函数
data = Import["C:\\Users\\acer\\Desktop\\data.txt",
"Table"]; ListLinePlot[data, Mesh -> All,
MeshStyle -> Directive, Red]]
model = a Sin + d;
fit = FindFit;
Show, {x, 0, 30}],
ListPlot]
页: [1]
查看完整版本: 如何拟合