于向前 发表于 2006-3-8 19:35

各位高手,请问一下MATLAB怎么进行曲面拟合

x=;
y=;
z=[ 3 54 5 667 7 8 9 6 56 4]

年华 发表于 2006-3-8 20:26

你这数列都不样大小的啊,如果是同样长度的可以拟合,最小二成法就可,点太少,结果可能较差

happy 发表于 2006-3-10 08:58

曲面拟合可以参考帖子
http://forum.vibunion.com/thread-1005-1-1.html
不过你这组数不对

于向前 发表于 2006-3-11 10:12

不好意思,真正的数据如下,那个例子我参考过了,也得到了拟合函数,不过用插值法得到的数据不对,与原数据差别太大,请各位高手再指点小弟一下。
x=;

y=;


z=[792 598 578 412 384 360 261 230 202 191 181 176 ...
624 485 470 344 322 303 223 197 175 165 157 152 ...
526 416 404 301 282 266 199 176 156 148 141 137 ...
505 311 303 257 242 227 157 134 117 112 109 109 ...
417 273 265 218 206 194 136 117 103 98.9 96.8 96.4 ...
360 248 239 192 181 171 122 105 93.3 89.8 88 87.7 ...
319 228 220 174 164 155 111 96.7 86.1 83 81.4 81.2 ...
288 213 205 159 150 142 103 90 80.5 77.7 76.2 76 ...
264 197 189 148 140 132 96.3 84.2 75.4 72.8 71.5 71.3 ...
245 183 177 139 131 124 90.6 79.4 71.2 68.8 67.5 67.3 ...
229 172 166 131 124 117 85.9 75.3 67.6 65.4 64.2 64 ...
202 152 147 117 111 105 77.6 68.3 61.6 59.6 68.6 58.4 ...
181 138 133 107 101 95.8 71.2 63 56.9 55.2 54.3 54.1 ...
165 126 122 98.2 93.2 88.6 66.2 58.7 53.2 51.6 50.8 50.6 ...
152 116 113 91.4 86.8 82.5 62 55.1 50.1 48.6 47.9 47.7 ...
141 109 105 85.7 81.4 77.5 58.5 52.1 47.5 46.1 45.4 45.3 ...
132 102 98.8 80.8 76.9 73.2 55.5 49.5 45.2 44 43.3 43.2 ...
124 96.2 93.3 76.6 72.9 69.4 52.9 47.3 43.3 42.1 41.5 41.4 ...
117 91.3 88.6 72.9 69.5 66.2 50.6 45.3 41.5 40.4 39.8 39.7 ...
111 86.9 84.3 69.7 66.4 63.3 48.5 43.6 40 38.9 38.4 38.3 ...
106 83 80.6 66.8 63.7 60.8 46.7 42 38.6 37.6 37.1 37 ...
101 79.2 76.9 63.9 60.9 58.1 44.7 40.2 37 36 35.5 35.4 ...
96.2 75.8 73.7 61.2 58.4 55.7 42.9 38.6 35.5 34.6 34.1 34 ...
92 72.8 70.7 58.8 56.1 53.5 41.3 37.2 34.2 33.3 32.8 32.8 ...
88.3 70 68 56.6 54 51.6 39.8 35.8 32.9 32.1 31.7 31.6 ...
84.8 67.4 65.5 54.7 52.1 49.8 38.4 34.6 31.8 31 30.6 30.5 ...
81.7 65.1 63.3 52.8 50.4 48.1 37.2 33.5 30.8 30 29.6 29.5 ...
78.8 62.9 61.2 51.1 48.8 46.6 36 32.4 29.9 29.1 28.7 28.6 ...
76.1 60.9 59.3 49.6 47.3 45.2 34.9 31.5 29 28.2 27.9 27.8 ...
73.7 59.1 57.5 48.1 45.9 43.9 33.9 30.6 28.2 27.5 27.1 27 ...
71.4 57.4 55.8 46.8 44.6 42.6 33 29.8 27.4 26.7 26.4 26.3 ...
66.3 53.6 52.1 43.8 41.8 39.9 30.9 27.9 25.7 25.1 24.7 24.7 ...
62 50.3 49 41.2 39.3 37.6 29.1 26.3 24.2 23.6 23.3 23.3 ...
58.2 47.5 46.2 39 37.2 35.5 27.6 24.9 23 22.4 22.1 22.1 ...
55 45 43.8 37 35.3 33.8 26.2 23.7 21.9 21.3 21 21 ...
52 42.6 41.5 35.2 33.7 32.2 25.2 22.8 21.1 20.6 20.4 20.3 ...
49.3 40.5 39.5 33.6 32.2 30.8 24.3 22.1 20.4 20 19.7 19.7 ...
46.9 38.6 37.7 32.2 30.9 29.6 23.4 21.3 19.8 19.4 19.2 19.1 ...
44.7 36.9 36 30.9 29.7 28.4 22.6 20.7 19.3 18.9 18.7 18.6 ...
42.8 35.4 34.6 29.8 28.6 27.4 21.9 20.1 18.8 18.4 18.2 18.1 ...
41 34 33.2 28.7 27.6 26.5 21.3 19.6 18.3 17.9 17.7 17.7 ...
38 31.6 30.8 26.7 25.6 24.7 19.9 18.3 17.1 16.8 16.6 16.6 ...
35.4 29.5 28.8 25 24 23.1 18.7 17.2 16.1 15.8 15.7 15.6 ...
33.2 27.7 27.1 23.5 22.6 21.8 17.1 16.3 15.3 15 14.8 14.8 ...
31.3 26.1 25.6 22.2 21.4 20.6 16.8 15.5 14.5 14.3 14.1 14.1 ...
29.6 24.8 24.2 21.1 20.3 19.6 15.9 14.7 13.9 13.6 13.5 13.4 ...
28.1 23.5 23 20.1 19.4 18.6 15.2 14.1 13.3 13 12.9 12.9 ...
26.7 22.5 22 19.2 18.5 17.8 14.6 13.5 12.7 12.5 12.4 12.3 ...
25.5 21.5 21 18.4 17.7 17.1 14 13 12.2 12 11.9 11.9 ...
24.4 20.6 20.1 17.7 17 16.4 13.5 12.5 11.8 11.6 11.5 11.5 ...
23.4 19.8 19.4 17 16.4 15.8 13 12.1 11.4 11.2 11.1 11.1 ...
21.7 18.4 18 15.8 15.2 14.7 12.1 11.3 10.7 10.5 10.4 10.4 ...
20.2 17.1 16.8 14.8 14.3 13.8 11.4 10.6 10 9.88 9.79 9.77 ...
19 16.1 15.8 13.9 13.4 13 10.8 10 9.51 9.35 9.27 9.26 ...
17.9 15.2 14.9 13.2 12.7 12.3 10.2 9.54 9.04 8.89 8.82 8.8 ...
16.9 14.4 14.1 12.5 12.1 11.7 9.74 9.09 8.62 8.48 8.41 8.4 ...
16.1 13.7 13.4 11.9 11.5 11.1 9.29 8.68 8.23 8.1 8.03 8.02 ...
15.3 13.1 12.8 11.4 11 10.6 8.89 8.31 7.88 7.76 7.7 7.69 ...
14.6 12.5 12.3 10.9 10.5 10.2 8.53 7.97 7.57 7.45 7.39 7.38 ...
14 12 11.8 10.5 10.1 9.78 8.2 7.67 7.28 7.17 7.11 7.1 ...
13.4 11.5 11.3 10.1 9.73 9.41 7.9 7.39 7.02 6.91 6.86 6.85 ...
12.2 10.5 10.3 9.21 8.9 8.62 7.25 6.79 6.45 6.36 6.31 6.3 ...
11.2 9.72 9.54 8.51 8.23 7.97 6.71 6.29 5.99 5.9 5.85 5.84 ...
10.4 9.03 8.87 7.92 7.66 7.42 6.26 5.87 5.59 5.51 5.47 5.46 ...
9.72 8.45 8.29 7.41 7.18 6.95 5.88 5.52 5.26 5.18 5.14 5.13 ...
9.12 7.94 7.8 6.98 6.76 6.55 5.54 5.21 4.96 4.89 4.85 4.85 ...
8.6 7.5 7.37 6.6 6.39 6.19 5.25 4.94 4.71 4.64 4.61 4.6 ...
8.17 7.11 6.99 6.27 6.08 5.89 5 4.71 4.49 4.43 4.39 4.39 ...
7.79 6.77 6.65 5.98 5.8 5.62 4.78 4.5 4.29 4.23 4.2 4.2 ...
7.14 6.18 6.08 5.49 5.32 5.16 4.4 4.14 3.96 3.9 3.87 3.87 ...
6.6 5.7 5.61 5.08 4.93 4.78 4.08 3.85 3.68 3.63 3.6 3.6 ...
6.2 5.36 5.27 4.78 4.63 4.5 3.84 3.62 3.46 3.42 3.39 3.39 ...
5.85 5.07 4.98 4.52 4.38 4.25 3.64 3.43 3.28 3.24 3.21 3.21 ...
5.55 4.81 4.73 4.29 4.16 4.04 3.46 3.26 3.12 3.08 3.05 3.05 ...
5.29 4.58 4.51 4.09 3.97 3.85 3.3 3.11 2.98 2.94 2.91 2.91 ...
5.05 4.38 4.32 3.92 3.8 3.69 3.16 2.98 2.85 2.81 2.79 2.79 ...
4.84 4.21 4.14 3.76 3.64 3.54 3.03 2.86 2.73 2.7 2.68 2.68 ...
4.65 4.04 3.98 3.61 3.51 3.4 2.91 2.75 2.63 2.6 2.58 2.58 ...
4.48 3.9 3.84 3.48 3.38 3.28 2.81 2.65 2.54 2.5 2.49 2.48 ...
4.32 3.76 3.7 3.36 3.26 3.17 2.72 2.56 2.45 2.42 2.4 2.4 ...
4.18 3.64 3.58 3.26 3.16 3.07 2.63 2.48 2.37 2.34 2.33 2.32 ...
4.05 3.53 3.47 3.16 3.06 2.97 2.55 2.41 2.3 2.27 2.26 2.25 ...
3.93 3.42 3.37 3.06 2.97 2.89 2.47 2.34 2.24 2.21 2.19 2.19 ...
3.81 3.33 3.27 2.98 2.89 2.8 2.41 2.27 2.17 2.15 2.13 2.13 ...
3.71 3.23 3.18 2.9 2.81 2.73 2.34 2.21 2.12 2.09 2.07 2.07 ...
3.61 3.15 3.1 2.82 2.74 2.66 2.28 2.15 2.06 2.04 2.02 2.02 ...
3.52 3.07 3.02 2.75 2.67 2.59 2.23 2.1 2.01 1.99 1.97 1.97 ...
3.43 3 2.95 2.69 2.61 2.53 2.17 2.05 1.96 1.94 1.93 1.92 ...
3.35 2.93 2.88 2.62 2.55 2.47 2.12 2.01 1.92 1.9 1.88 1.88 ...
3.27 2.86 2.82 2.57 2.49 2.42 2.08 1.96 1.88 1.85 1.84 1.84 ...
3.2 2.8 2.76 2.51 2.44 2.37 2.03 1.92 1.84 1.81 1.8 1.8]

happy 发表于 2006-3-11 15:41

见http://forum.vibunion.com/thread-7999-1-1.html回复
页: [1]
查看完整版本: 各位高手,请问一下MATLAB怎么进行曲面拟合