登录论坛

查看完整版本 : 请指点以下出错在哪里?


旭无双
2009-09-14, 21:59
我在做二次曲线拟合时,遇到这样的出错:
Warning: Polynomial is badly conditioned. Remove repeated data points
or try centering and scaling as described in HELP POLYFIT.
> In polyfit at 79
In lvbo at 120
其中的 In polyfit at 79在polyfit.m中
In lvbo at 120
ss=[x2-1,x2,x2+1];
tt=[uu(x2-1),uu(x2),uu(x2+1)];
p=polyfit(ss,tt,n)
我是对ss与tt对应的三个点进行曲线拟合的,点数依次为(3019 237.06482263589132)(3020,239.6313185679545)(3021,238.41772604524604
),请指点!

cqxuiit
2009-10-05, 17:42
1. 3个点至多二次拟合;
2. 你给定的三个点横坐标3019,3020,3021非常接近,需要取3020作为中心点(平移),所以先得对数据进行处理啊!

未注册
2010-04-13, 10:29
拟合次数太高。调小就可以