- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想将以下函数拟合到我的数据中:
f(x) = Offset+Amplitudesin(FrequencyT+Phase),
或根据 Wikipedia : f(x) = C+alphasin(omegaT+phi)
我的数据存储在一个文件中的两列,我通过以下方式导入它们:
data<-read.table("C:/PATH/data.txt", header = FALSE, sep = "\t")
minV<-data[3]
cV<-data[1]
values<-as.numeric(unlist(minV))
T<-as.numeric(unlist(cV))
r<-nls(values~C+alpha*sin(W*T+phi), start=list(C=8958.34, alpha=115.886, W=0.0652, phi=14.9286),
C: 8950.06571617 alpha: -23.58439668 W: 0.06416806 phi: 16.46585060
#Counter angle min value EV-min value max value EV_max-value
1 0,703125 9033 -81,990234375 9043 -82,556640625
2 1,40625 9033 -81,990234375 9042 -81,556640625
3 2,109375 9027 -75,990234375 9042 -81,556640625
4 2,8125 9025 -73,990234375 9038 -77,556640625
5 3,515625 9018 -66,990234375 9031 -70,556640625
6 4,21875 9013 -61,990234375 9025 -64,556640625
7 4,921875 9009 -57,990234375 9020 -59,556640625
8 5,625 9011 -59,990234375 9017 -56,556640625
9 6,328125 9000 -48,990234375 9009 -48,556640625
10 7,03125 8996 -44,990234375 9004 -43,556640625
11 7,734375 8989 -37,990234375 9004 -43,556640625
12 8,4375 8983 -31,990234375 8993 -32,556640625
13 9,140625 8983 -31,990234375 8991 -30,556640625
14 9,84375 8982 -30,990234375 8991 -30,556640625
15 10,546875 8975 -23,990234375 8983 -22,556640625
16 11,25 8964 -12,990234375 8978 -17,556640625
17 11,953125 8967 -15,990234375 8977 -16,556640625
18 12,65625 8958 -6,990234375 8967 -6,556640625
19 13,359375 8951 0,009765625 8960 0,443359375
20 14,0625 8947 4,009765625 8954 6,443359375
21 14,765625 8938 13,009765625 8951 9,443359375
22 15,46875 8933 18,009765625 8940 20,443359375
23 16,171875 8929 22,009765625 8941 19,443359375
24 16,875 8925 26,009765625 8933 27,443359375
25 17,578125 8923 28,009765625 8929 31,443359375
26 18,28125 8920 31,009765625 8927 33,443359375
27 18,984375 8912 39,009765625 8921 39,443359375
28 19,6875 8899 52,009765625 8916 44,443359375
29 20,390625 8899 52,009765625 8907 53,443359375
30 21,09375 8894 57,009765625 8901 59,443359375
31 21,796875 8892 59,009765625 8896 64,443359375
32 22,5 8886 65,009765625 8896 64,443359375
33 23,203125 8881 70,009765625 8892 68,443359375
34 23,90625 8879 72,009765625 8886 74,443359375
35 24,609375 8884 67,009765625 8888 72,443359375
36 25,3125 8875 76,009765625 8886 74,443359375
37 26,015625 8864 87,009765625 8881 79,443359375
38 26,71875 8860 91,009765625 8870 90,443359375
39 27,421875 8864 87,009765625 8872 88,443359375
40 28,125 8862 89,009765625 8872 88,443359375
41 28,828125 8859 92,009765625 8868 92,443359375
42 29,53125 8857 94,009765625 8864 96,443359375
43 30,234375 8852 99,009765625 8860 100,443359375
44 30,9375 8852 99,009765625 8855 105,443359375
45 31,640625 8847 104,009765625 8857 103,443359375
46 32,34375 8844 107,009765625 8853 107,443359375
47 33,046875 8842 109,009765625 8849 111,443359375
48 33,75 8844 107,009765625 8855 105,443359375
49 34,453125 8846 105,009765625 8852 108,443359375
50 35,15625 8846 105,009765625 8853 107,443359375
51 35,859375 8839 112,009765625 8849 111,443359375
52 36,5625 8841 110,009765625 8849 111,443359375
53 37,265625 8841 110,009765625 8846 114,443359375
54 37,96875 8844 107,009765625 8852 108,443359375
55 38,671875 8841 110,009765625 8852 108,443359375
56 39,375 8835 116,009765625 8846 114,443359375
57 40,078125 8839 112,009765625 8847 113,443359375
58 40,78125 8839 112,009765625 8847 113,443359375
59 41,484375 8846 105,009765625 8857 103,443359375
60 42,1875 8849 102,009765625 8860 100,443359375
61 42,890625 8852 99,009765625 8860 100,443359375
62 43,59375 8852 99,009765625 8860 100,443359375
63 44,296875 8853 98,009765625 8866 94,443359375
64 45 8857 94,009765625 8864 96,443359375
65 45,703125 8860 91,009765625 8864 96,443359375
66 46,40625 8860 91,009765625 8870 90,443359375
67 47,109375 8866 85,009765625 8875 85,443359375
68 47,8125 8868 83,009765625 8878 82,443359375
69 48,515625 8875 76,009765625 8884 76,443359375
70 49,21875 8884 67,009765625 8892 68,443359375
71 49,921875 8883 68,009765625 8894 66,443359375
72 50,625 8888 63,009765625 8897 63,443359375
73 51,328125 8892 59,009765625 8899 61,443359375
74 52,03125 8897 54,009765625 8909 51,443359375
75 52,734375 8903 48,009765625 8910 50,443359375
76 53,4375 8910 41,009765625 8921 39,443359375
77 54,140625 8916 35,009765625 8923 37,443359375
78 54,84375 8923 28,009765625 8929 31,443359375
79 55,546875 8925 26,009765625 8936 24,443359375
80 56,25 8930 21,009765625 8938 22,443359375
81 56,953125 8929 22,009765625 8938 22,443359375
82 57,65625 8936 15,009765625 8947 13,443359375
83 58,359375 8943 8,009765625 8954 6,443359375
84 59,0625 8947 4,009765625 8960 0,443359375
85 59,765625 8960 -8,990234375 8965 -4,556640625
86 60,46875 8965 -13,990234375 8973 -12,556640625
87 61,171875 8964 -12,990234375 8973 -12,556640625
88 61,875 8969 -17,990234375 8980 -19,556640625
89 62,578125 8967 -15,990234375 8980 -19,556640625
90 63,28125 8969 -17,990234375 8975 -14,556640625
91 63,984375 8975 -23,990234375 8983 -22,556640625
92 64,6875 8978 -26,990234375 8991 -30,556640625
93 65,390625 8985 -33,990234375 8998 -37,556640625
94 66,09375 8991 -39,990234375 9000 -39,556640625
95 66,796875 9000 -48,990234375 9006 -45,556640625
96 67,5 9004 -52,990234375 9013 -52,556640625
97 68,203125 9009 -57,990234375 9017 -56,556640625
98 68,90625 9013 -61,990234375 9022 -61,556640625
99 69,609375 9017 -65,990234375 9027 -66,556640625
100 70,3125 9024 -72,990234375 9033 -72,556640625
101 71,015625 9029 -77,990234375 9037 -76,556640625
102 71,71875 9031 -79,990234375 9042 -81,556640625
103 72,421875 9035 -83,990234375 9043 -82,556640625
104 73,125 9040 -88,990234375 9048 -87,556640625
105 73,828125 9048 -96,990234375 9054 -93,556640625
106 74,53125 9049 -97,990234375 9060 -99,556640625
107 75,234375 9051 -99,990234375 9064 -103,556640625
108 75,9375 9061 -109,990234375 9072 -111,556640625
109 76,640625 9060 -108,990234375 9069 -108,556640625
110 77,34375 9066 -114,990234375 9072 -111,556640625
111 78,046875 9064 -112,990234375 9072 -111,556640625
112 78,75 9067 -115,990234375 9071 -110,556640625
113 79,453125 9072 -120,990234375 9082 -121,556640625
114 80,15625 9069 -117,990234375 9080 -119,556640625
115 80,859375 9072 -120,990234375 9082 -121,556640625
116 81,5625 9074 -122,990234375 9083 -122,556640625
117 82,265625 9078 -126,990234375 9089 -128,556640625
118 82,96875 9082 -130,990234375 9090 -129,556640625
119 83,671875 9085 -133,990234375 9090 -129,556640625
120 84,375 9078 -126,990234375 9089 -128,556640625
121 85,078125 9072 -120,990234375 9083 -122,556640625
122 85,78125 9072 -120,990234375 9080 -119,556640625
123 86,484375 9076 -124,990234375 9085 -124,556640625
124 87,1875 9071 -119,990234375 9076 -115,556640625
125 87,890625 9067 -115,990234375 9074 -113,556640625
126 88,59375 9066 -114,990234375 9078 -117,556640625
127 89,296875 9066 -114,990234375 9078 -117,556640625
128 90 9066 -114,990234375 9076 -115,556640625
129 90,703125 9066 -114,990234375 9072 -111,556640625
130 91,40625 9061 -109,990234375 9071 -110,556640625
131 92,109375 9058 -106,990234375 9069 -108,556640625
132 92,8125 9061 -109,990234375 9069 -108,556640625
133 93,515625 9054 -102,990234375 9069 -108,556640625
134 94,21875 9053 -101,990234375 9056 -95,556640625
135 94,921875 9053 -101,990234375 9060 -99,556640625
136 95,625 9048 -96,990234375 9056 -95,556640625
137 96,328125 9042 -90,990234375 9051 -90,556640625
138 97,03125 9042 -90,990234375 9045 -84,556640625
139 97,734375 9035 -83,990234375 9043 -82,556640625
140 98,4375 9033 -81,990234375 9043 -82,556640625
141 99,140625 9024 -72,990234375 9031 -70,556640625
142 99,84375 9027 -75,990234375 9037 -76,556640625
143 100,546875 9018 -66,990234375 9031 -70,556640625
144 101,25 9011 -59,990234375 9020 -59,556640625
145 101,953125 9011 -59,990234375 9018 -57,556640625
146 102,65625 9006 -54,990234375 9011 -50,556640625
147 103,359375 9000 -48,990234375 9006 -45,556640625
148 104,0625 8993 -41,990234375 9004 -43,556640625
149 104,765625 8985 -33,990234375 8998 -37,556640625
150 105,46875 8987 -35,990234375 8994 -33,556640625
151 106,171875 8982 -30,990234375 8987 -26,556640625
152 106,875 8973 -21,990234375 8983 -22,556640625
153 107,578125 8965 -13,990234375 8977 -16,556640625
154 108,28125 8969 -17,990234375 8977 -16,556640625
155 108,984375 8965 -13,990234375 8971 -10,556640625
156 109,6875 8953 -1,990234375 8965 -4,556640625
157 110,390625 8951 0,009765625 8962 -1,556640625
158 111,09375 8943 8,009765625 8951 9,443359375
159 111,796875 8938 13,009765625 8951 9,443359375
160 112,5 8930 21,009765625 8941 19,443359375
161 113,203125 8927 24,009765625 8940 20,443359375
162 113,90625 8923 28,009765625 8930 30,443359375
163 114,609375 8923 28,009765625 8930 30,443359375
164 115,3125 8914 37,009765625 8929 31,443359375
165 116,015625 8909 42,009765625 8920 40,443359375
166 116,71875 8901 50,009765625 8914 46,443359375
167 117,421875 8899 52,009765625 8910 50,443359375
168 118,125 8890 61,009765625 8896 64,443359375
169 118,828125 8886 65,009765625 8896 64,443359375
170 119,53125 8884 67,009765625 8896 64,443359375
171 120,234375 8881 70,009765625 8890 70,443359375
172 120,9375 8883 68,009765625 8890 70,443359375
173 121,640625 8878 73,009765625 8886 74,443359375
174 122,34375 8875 76,009765625 8883 77,443359375
175 123,046875 8862 89,009765625 8875 85,443359375
176 123,75 8866 85,009765625 8878 82,443359375
177 124,453125 8866 85,009765625 8875 85,443359375
178 125,15625 8864 87,009765625 8875 85,443359375
179 125,859375 8860 91,009765625 8868 92,443359375
180 126,5625 8857 94,009765625 8870 90,443359375
181 127,265625 8853 98,009765625 8857 103,443359375
182 127,96875 8847 104,009765625 8859 101,443359375
183 128,671875 8847 104,009765625 8857 103,443359375
184 129,375 8844 107,009765625 8849 111,443359375
185 130,078125 8844 107,009765625 8855 105,443359375
186 130,78125 8844 107,009765625 8853 107,443359375
187 131,484375 8841 110,009765625 8852 108,443359375
188 132,1875 8839 112,009765625 8849 111,443359375
189 132,890625 8841 110,009765625 8849 111,443359375
190 133,59375 8841 110,009765625 8847 113,443359375
191 134,296875 8841 110,009765625 8846 114,443359375
192 135 8839 112,009765625 8847 113,443359375
193 135,703125 8836 115,009765625 8844 116,443359375
194 136,40625 8836 115,009765625 8844 116,443359375
195 137,109375 8841 110,009765625 8849 111,443359375
196 137,8125 8844 107,009765625 8855 105,443359375
197 138,515625 8844 107,009765625 8857 103,443359375
198 139,21875 8853 98,009765625 8862 98,443359375
199 139,921875 8852 99,009765625 8860 100,443359375
200 140,625 8853 98,009765625 8862 98,443359375
201 141,328125 8855 96,009765625 8864 96,443359375
202 142,03125 8859 92,009765625 8862 98,443359375
203 142,734375 8859 92,009765625 8866 94,443359375
204 143,4375 8868 83,009765625 8878 82,443359375
205 144,140625 8870 81,009765625 8883 77,443359375
206 144,84375 8875 76,009765625 8884 76,443359375
207 145,546875 8881 70,009765625 8890 70,443359375
208 146,25 8886 65,009765625 8894 66,443359375
209 146,953125 8888 63,009765625 8897 63,443359375
210 147,65625 8890 61,009765625 8903 57,443359375
211 148,359375 8903 48,009765625 8910 50,443359375
212 149,0625 8903 48,009765625 8916 44,443359375
213 149,765625 8907 44,009765625 8920 40,443359375
214 150,46875 8918 33,009765625 8925 35,443359375
215 151,171875 8921 30,009765625 8929 31,443359375
216 151,875 8927 24,009765625 8936 24,443359375
217 152,578125 8929 22,009765625 8940 20,443359375
218 153,28125 8933 18,009765625 8943 17,443359375
219 153,984375 8940 11,009765625 8947 13,443359375
220 154,6875 8943 8,009765625 8954 6,443359375
221 155,390625 8954 -2,990234375 8964 -3,556640625
222 156,09375 8956 -4,990234375 8967 -6,556640625
223 156,796875 8960 -8,990234375 8980 -19,556640625
224 157,5 8971 -19,990234375 8977 -16,556640625
225 158,203125 8973 -21,990234375 8980 -19,556640625
226 158,90625 8973 -21,990234375 8983 -22,556640625
227 159,609375 8969 -17,990234375 8980 -19,556640625
228 160,3125 8971 -19,990234375 8987 -26,556640625
229 161,015625 8978 -26,990234375 8989 -28,556640625
230 161,71875 8987 -35,990234375 8998 -37,556640625
231 162,421875 8994 -42,990234375 9004 -43,556640625
232 163,125 9000 -48,990234375 9006 -45,556640625
233 163,828125 9006 -54,990234375 9013 -52,556640625
234 164,53125 9009 -57,990234375 9020 -59,556640625
235 165,234375 9014 -62,990234375 9024 -63,556640625
236 165,9375 9020 -68,990234375 9029 -68,556640625
237 166,640625 9025 -73,990234375 9035 -74,556640625
238 167,34375 9027 -75,990234375 9038 -77,556640625
239 168,046875 9033 -81,990234375 9042 -81,556640625
240 168,75 9033 -81,990234375 9043 -82,556640625
241 169,453125 9040 -88,990234375 9049 -88,556640625
242 170,15625 9045 -93,990234375 9054 -93,556640625
243 170,859375 9048 -96,990234375 9060 -99,556640625
244 171,5625 9056 -104,990234375 9064 -103,556640625
245 172,265625 9058 -106,990234375 9067 -106,556640625
246 172,96875 9060 -108,990234375 9071 -110,556640625
247 173,671875 9061 -109,990234375 9071 -110,556640625
248 174,375 9067 -115,990234375 9076 -115,556640625
249 175,078125 9067 -115,990234375 9078 -117,556640625
250 175,78125 9067 -115,990234375 9078 -117,556640625
251 176,484375 9071 -119,990234375 9082 -121,556640625
252 177,1875 9069 -117,990234375 9082 -121,556640625
253 177,890625 9072 -120,990234375 9085 -124,556640625
254 178,59375 9082 -130,990234375 9089 -128,556640625
255 179,296875 9080 -128,990234375 9092 -131,556640625
256 180 9080 -128,990234375 9092 -131,556640625
257 180,703125 9078 -126,990234375 9089 -128,556640625
258 181,40625 9076 -124,990234375 9083 -122,556640625
259 182,109375 9074 -122,990234375 9085 -124,556640625
260 182,8125 9076 -124,990234375 9082 -121,556640625
261 183,515625 9071 -119,990234375 9078 -117,556640625
262 184,21875 9067 -115,990234375 9078 -117,556640625
263 184,921875 9071 -119,990234375 9078 -117,556640625
264 185,625 9067 -115,990234375 9076 -115,556640625
265 186,328125 9069 -117,990234375 9078 -117,556640625
266 187,03125 9064 -112,990234375 9074 -113,556640625
267 187,734375 9064 -112,990234375 9074 -113,556640625
268 188,4375 9061 -109,990234375 9071 -110,556640625
269 189,140625 9058 -106,990234375 9066 -105,556640625
270 189,84375 9056 -104,990234375 9066 -105,556640625
271 190,546875 9053 -101,990234375 9056 -95,556640625
272 191,25 9051 -99,990234375 9061 -100,556640625
273 191,953125 9048 -96,990234375 9058 -97,556640625
274 192,65625 9040 -88,990234375 9054 -93,556640625
275 193,359375 9042 -90,990234375 9048 -87,556640625
276 194,0625 9037 -85,990234375 9045 -84,556640625
277 194,765625 9033 -81,990234375 9045 -84,556640625
278 195,46875 9029 -77,990234375 9043 -82,556640625
279 196,171875 9027 -75,990234375 9040 -79,556640625
280 196,875 9020 -68,990234375 9038 -77,556640625
281 197,578125 9011 -59,990234375 9029 -68,556640625
282 198,28125 9009 -57,990234375 9020 -59,556640625
283 198,984375 9002 -50,990234375 9013 -52,556640625
284 199,6875 8996 -44,990234375 9009 -48,556640625
285 200,390625 8993 -41,990234375 9004 -43,556640625
286 201,09375 8989 -37,990234375 8996 -35,556640625
287 201,796875 8983 -31,990234375 8991 -30,556640625
288 202,5 8985 -33,990234375 8991 -30,556640625
289 203,203125 8978 -26,990234375 8989 -28,556640625
290 203,90625 8977 -25,990234375 8983 -22,556640625
291 204,609375 8971 -19,990234375 8982 -21,556640625
292 205,3125 8958 -6,990234375 8971 -10,556640625
293 206,015625 8958 -6,990234375 8965 -4,556640625
294 206,71875 8947 4,009765625 8958 2,443359375
295 207,421875 8941 10,009765625 8954 6,443359375
296 208,125 8934 17,009765625 8951 9,443359375
297 208,828125 8933 18,009765625 8940 20,443359375
298 209,53125 8929 22,009765625 8938 22,443359375
299 210,234375 8927 24,009765625 8934 26,443359375
300 210,9375 8920 31,009765625 8930 30,443359375
301 211,640625 8916 35,009765625 8921 39,443359375
302 212,34375 8909 42,009765625 8921 39,443359375
303 213,046875 8903 48,009765625 8910 50,443359375
304 213,75 8894 57,009765625 8905 55,443359375
305 214,453125 8894 57,009765625 8899 61,443359375
306 215,15625 8883 68,009765625 8897 63,443359375
307 215,859375 8881 70,009765625 8890 70,443359375
308 216,5625 8886 65,009765625 8894 66,443359375
309 217,265625 8879 72,009765625 8888 72,443359375
310 217,96875 8878 73,009765625 8886 74,443359375
311 218,671875 8873 78,009765625 8883 77,443359375
312 219,375 8862 89,009765625 8878 82,443359375
313 220,078125 8866 85,009765625 8878 82,443359375
314 220,78125 8862 89,009765625 8870 90,443359375
315 221,484375 8857 94,009765625 8862 98,443359375
316 222,1875 8859 92,009765625 8864 96,443359375
317 222,890625 8859 92,009765625 8870 90,443359375
318 223,59375 8857 94,009765625 8868 92,443359375
319 224,296875 8852 99,009765625 8860 100,443359375
320 225 8847 104,009765625 8857 103,443359375
321 225,703125 8842 109,009765625 8853 107,443359375
322 226,40625 8844 107,009765625 8855
323 227,109375 8849 102,009765625 8857
324 227,8125 8839 112,009765625 8849
325 228,515625 8842 109,009765625 8849
326 229,21875 8841 110,009765625 8849
327 229,921875 8842 109,009765625 8852
328 230,625 8836 115,009765625 8855
329 231,328125 8839 112,009765625 8846
330 232,03125 8836 115,009765625 8844
331 232,734375 8839 112,009765625 8846
332 233,4375 8842 109,009765625 8852
333 234,140625 8846 105,009765625 8857
334 234,84375 8852 99,009765625 8857
335 235,546875 8857 94,009765625 8862
336 236,25 8855 96,009765625 8862
337 236,953125 8857 94,009765625 8864
338 237,65625 8857 94,009765625 8864
339 238,359375 8857 94,009765625 8866
340 239,0625 8857 94,009765625 8872
341 239,765625 8866 85,009765625 8878
342 240,46875 8873 78,009765625 8881
343 241,171875 8878 73,009765625 8886
344 241,875 8883 68,009765625 8892
345 242,578125 8886 65,009765625 8896
346 243,28125 8892 59,009765625 8899
347 243,984375 8896 55,009765625 8905
348 244,6875 8903 48,009765625 8909
349 245,390625 8907 44,009765625 8916
350 246,09375 8912 39,009765625 8920
351 246,796875 8914 37,009765625 8929
352 247,5 8927 24,009765625 8934
353 248,203125 8925 26,009765625 8936
354 248,90625 8929 22,009765625 8938
355 249,609375 8933 18,009765625 8940
356 250,3125 8940 11,009765625 8951
357 251,015625 8949 2,009765625 8958
358 251,71875 8958 -6,990234375 8964
359 252,421875 8962 -10,990234375 8973
360 253,125 8965 -13,990234375 8973
361 253,828125 8967 -15,990234375 8980
362 254,53125 8971 -19,990234375 8980
363 255,234375 8967 -15,990234375 8982
364 255,9375 8975 -23,990234375 8982
365 256,640625 8975 -23,990234375 8983
366 257,34375 8977 -25,990234375 8991
367 258,046875 8989 -37,990234375 8994
368 258,75 8989 -37,990234375 9000
369 259,453125 8996 -44,990234375 9007
370 260,15625 9004 -52,990234375 9013
371 260,859375 9007 -55,990234375 9018
372 261,5625 9014 -62,990234375 9022
373 262,265625 9017 -65,990234375 9025
374 262,96875 9025 -73,990234375 9037
375 263,671875 9029 -77,990234375 9042
376 264,375 9033 -81,990234375 9042
377 265,078125 9031 -79,990234375 9043
378 265,78125 9042 -90,990234375 9051
379 266,484375 9043 -91,990234375 9054
380 267,1875 9048 -96,990234375 9058
381 267,890625 9048 -96,990234375 9061
382 268,59375 9056 -104,990234375 9060
383 269,296875 9060 -108,990234375 9067
384 270 9064 -112,990234375 9071
385 270,703125 9064 -112,990234375 9072
386 271,40625 9069 -117,990234375 9074
387 272,109375 9071 -119,990234375 9080
388 272,8125 9072 -120,990234375 9082
389 273,515625 9071 -119,990234375 9083
390 274,21875 9078 -126,990234375 9083
391 274,921875 9080 -128,990234375 9087
392 275,625 9082 -130,990234375 9085
393 276,328125 9083 -131,990234375 9090
394 277,03125 9072 -120,990234375 9087
395 277,734375 9071 -119,990234375 9078
396 278,4375 9072 -120,990234375 9082
397 279,140625 9076 -124,990234375 9085
398 279,84375 9074 -122,990234375 9082
399 280,546875 9069 -117,990234375 9074
400 281,25 9066 -114,990234375 9076
401 281,953125 9069 -117,990234375 9076
402 282,65625 9064 -112,990234375 9072
403 283,359375 9066 -114,990234375 9074
404 284,0625 9064 -112,990234375 9069
405 284,765625 9064 -112,990234375 9071
406 285,46875 9056 -104,990234375 9067
407 286,171875 9056 -104,990234375 9066
408 286,875 9056 -104,990234375 9061
409 287,578125 9051 -99,990234375 9060
410 288,28125 9042 -90,990234375 9058
411 288,984375 9040 -88,990234375 9051
412 289,6875 9038 -86,990234375 9048
413 290,390625 9035 -83,990234375 9043
414 291,09375 9033 -81,990234375 9042
415 291,796875 9027 -75,990234375 9038
416 292,5 9027 -75,990234375 9038
417 293,203125 9020 -68,990234375 9029
418 293,90625 9013 -61,990234375 9022
419 294,609375 9011 -59,990234375 9024
420 295,3125 9004 -52,990234375 9013
421 296,015625 9000 -48,990234375 9004
422 296,71875 8994 -42,990234375 9004
423 297,421875 8983 -31,990234375 8998
424 298,125 8978 -26,990234375 8989
425 298,828125 8982 -30,990234375 8989
426 299,53125 8978 -26,990234375 8983
427 300,234375 8973 -21,990234375 8982
428 300,9375 8969 -17,990234375 8982
429 301,640625 8960 -8,990234375 8975
430 302,34375 8953 -1,990234375 8965
431 303,046875 8949 2,009765625 8954
432 303,75 8947 4,009765625 8954
433 304,453125 8936 15,009765625 8949
434 305,15625 8930 21,009765625 8941
435 305,859375 8925 26,009765625 8936
436 306,5625 8925 26,009765625 8934
437 307,265625 8918 33,009765625 8927
438 307,96875 8916 35,009765625 8921
439 308,671875 8905 46,009765625 8920
440 309,375 8899 52,009765625 8910
441 310,078125 8892 59,009765625 8905
442 310,78125 8890 61,009765625 8897
443 311,484375 8886 65,009765625 8896
444 312,1875 8886 65,009765625 8894
445 312,890625 8879 72,009765625 8892
446 313,59375 8879 72,009765625 8888
447 314,296875 8878 73,009765625 8886
448 315 8873 78,009765625 8883
449 315,703125 8866 85,009765625 8878
450 316,40625 8866 85,009765625 8875
451 317,109375 8866 85,009765625 8873
452 317,8125 8860 91,009765625 8872
453 318,515625 8859 92,009765625 8868
454 319,21875 8857 94,009765625 8868
455 319,921875 8857 94,009765625 8864
456 320,625 8847 104,009765625 8860
457 321,328125 8847 104,009765625 8857
458 322,03125 8842 109,009765625 8852
459 322,734375 8841 110,009765625 8852
460 323,4375 8844 107,009765625 8853
461 324,140625 8846 105,009765625 8857
462 324,84375 8841 110,009765625 8853
463 325,546875 8836 115,009765625 8846
464 326,25 8839 112,009765625 8844
465 326,953125 8841 110,009765625 8846
466 327,65625 8839 112,009765625 8847
467 328,359375 8842 109,009765625 8852
468 329,0625 8836 115,009765625 8844
469 329,765625 8842 109,009765625 8847
470 330,46875 8842 109,009765625 8849
471 331,171875 8849 102,009765625 8860
472 331,875 8857 94,009765625 8864
473 332,578125 8852 99,009765625 8859
474 333,28125 8852 99,009765625 8862
475 333,984375 8855 96,009765625 8862
476 334,6875 8857 94,009765625 8866
477 335,390625 8862 89,009765625 8870
478 336,09375 8864 87,009765625 8875
479 336,796875 8868 83,009765625 8878
480 337,5 8872 79,009765625 8884
481 338,203125 8881 70,009765625 8888
482 338,90625 8886 65,009765625 8894
483 339,609375 8884 67,009765625 8899
484 340,3125 8886 65,009765625 8899
485 341,015625 8897 54,009765625 8909
486 341,71875 8901 50,009765625 8910
487 342,421875 8903 48,009765625 8916
488 343,125 8914 37,009765625 8923
489 343,828125 8925 26,009765625 8929
490 344,53125 8929 22,009765625 8934
491 345,234375 8927 24,009765625 8938
492 345,9375 8927 24,009765625 8936
493 346,640625 8930 21,009765625 8941
494 347,34375 8947 4,009765625 8954
495 348,046875 8947 4,009765625 8960
496 348,75 8958 -6,990234375 8967
497 349,453125 8960 -8,990234375 8973
498 350,15625 8965 -13,990234375 8977
499 350,859375 8967 -15,990234375 8978
500 351,5625 8964 -12,990234375 8971
501 352,265625 8962 -10,990234375 8973
502 352,96875 8971 -19,990234375 8983
503 353,671875 8977 -25,990234375 8985
504 354,375 8983 -31,990234375 8994
505 355,078125 8989 -37,990234375 8998
506 355,78125 8994 -42,990234375 9007
507 356,484375 9004 -52,990234375 9009
508 357,1875 9002 -50,990234375 9020
509 357,890625 9011 -59,990234375 9025
510 358,59375 9017 -65,990234375 9027
511 359,296875 9022 -70,990234375 9027
512 360 9022 -70,990234375 9038
最佳答案
这种问题受到局部极值的困扰。
通过展开正弦,您可以将模型重写为
C + alpha * sin(omega*T) + beta * cos(omega*T)
d <- read.table( "tmp.csv", dec=",", header=TRUE, nrows=400)
x <- d[,1]
y <- d[,3]
f <- function( omega ) {
x1 <- sin( omega * x )
x2 <- cos( omega * x )
r <- lm( y ~ x1 + x2 )
res <- mean( residuals(r)^2 )
attr( res, "coef" ) <- coef(r)
res
}
omegas <- seq( .001, .2, length=1000 )
res <- sapply(omegas, f)
plot(
omegas, res,
las=1,
ylab = "Residuals", xlab = "Omega",
main = "Objective function: multiple local minima"
)
i <- which.min( res )
omega0 <- optimize(f, interval = c(omegas[i-1], omegas[i+1]))$minimum
p <- c( attr( f(omega0), "coef" ), omega0 )
plot( x, y )
lines(
x,
p[1] + p[2] * sin( p[4] * x ) + p[3] * cos( p[4] * x ),
col = "orange", lwd=3
)
关于r - 对正弦模型进行非线性最小二乘 (nls) 拟合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18515903/
在 Eclipse 中运行我的程序时出现错误ORA-12705:无法访问 NLS 数据文件或指定的环境无效。 到目前为止我尝试过的事情: 我已经尝试在注册表的\HKEY_LOCAL_MACHINE\S
在 R 中工作,我正在尝试使用 nls() 将一些数据拟合到以下模型: y ~ c - a * exp(-b * x) 我的数据: x <- c(8, 8, 10, 10, 10, 10, 12, 1
我尝试搜索有关此主题的其他线程,但没有一个修复对我有用。我有一个自然实验的结果,我想显示符合指数分布的事件连续发生的次数。我的 R shell 粘贴在下面 f x [1] 1 2 3 4
对于这个数据集: dat = structure(list(x = c(5L, 5L, 5L, 5L, 10L, 10L, 10L, 10L, 15L, 15L, 15L, 15L, 17L, 17L
我正在使用 NLS.initializeMessages(BUNDLE_NAME, XYZ.class) 加载常量。 当“BUNDLE_NAME”和“XYZ.class”存在于同一个项目中时,它可以工
使用线性模型函数 lm() 多项式公式可以包含这样的快捷符号: m <- lm(y ~ poly(x,3)) 这是一个快捷方式,可以让用户不必创建 x^2 和 x^3 变量或将它们输入到公式中,例如
想象这两个列表如下: seq<-seq(1,16) L1<-list(A=seq, B=seq, C=seq, D=seq) v1=c(11,15,17,19,21,22,24,25,26,27,28
我想拟合一个线性平台 (nls) 模型,该模型将高度描述为年龄的函数,并且我想测试区域间模型的任何参数是否存在显着差异。 这是我目前所拥有的: # Create data df1 head (df1
我有一个输入日期(比如 sysdate),我想获取上一个星期一的日期。我试过 select trunc(sysdate, 'D') from dual; 但它依赖于 NLS。此外,我不想通过名称检查结
我正在尝试使用 R 中的 nls 拟合矩形双曲线。 curve.nlslrc = nls(photolrc ~ (1/(2*theta))*(AQY*PARlrc+Am-sqrt((AQY*PARlr
我正在使用 nls 拟合一些指数数据. 我正在使用的代码是: fit <- nls(y ~ expFit(times, A, tau, C), start = c(A=100, tau=-3, C=0
尝试拟合我的数据时遇到问题。 这是数据: x = c(1, 1.071519305, 1.148153621, 1.230268771, 1.318256739, 1.412537545, 1.513
我正在尝试制作 nls适合一个有点复杂的表达式,其中包括两个积分,其中两个拟合参数在其上限中。 我得到了错误 "Error in nlsModel(formula, mf, start, wts) :
有没有办法限制 NLS 系数在 R 中的取值范围?我知道我的数据应该存在的曲线形状;然而,NLS 无法通过产生 < 1 的功率系数来产生这样的曲线。 从本质上讲,我正在尝试为一组幼树茎(树苗)数据生成
我想将以下函数拟合到我的数据中: f(x) = Offset+Amplitudesin(FrequencyT+Phase), 或根据 Wikipedia : f(x) = C+alphasin(ome
我不明白为什么我不能为这些数据使用 nls 函数。 我尝试了很多不同的起始值,但总是出现相同的错误。 这是我一直在做的事情: expFct2 = function (x, a, b,c) { a*
我一直在研究一个曲线拟合脚本,该脚本将 3 个指数修改的高斯 (EMG) 拟合到卷积曲线。我的基函数类似于高斯分布,但包括第三个参数(前两个是 mu 和 sigma ),它确定函数的指数分量的权重。
我们的 java 类调用 PLSQL proc,它以由 NLS_DATE_FORMAT 定义的默认格式返回日期。我们的应用程序为国际化设置了自己的语言环境,但我希望日期格式保持为“DD-MON-RR”
谁能给我一个很好的解释,说明参数“算法”在 R 中的 nls 函数中的作用? 另外,公式是如何工作的?我知道它使用了 tilda,但我真的找不到对它的实际解释。 另外,起始值有多重要?我是否需要尝试多
我正在尝试使用 nls 将高斯峰拟合到 R 中的密度图.当我使用以下等式时: fit :2:0: unexpected end of input 1: ~ ^ 谁能指出我哪里出错了? 最佳答案 试
我是一名优秀的程序员,十分优秀!