Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2009-09-13
帖子: 2
声望力: 0 ![]() |
![]()
刚用MATLAB,在做对3个点进行抛物线拟合,然后进行插值找到抛物线顶点(最大值点),可是遇到这样一个问题:
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 116 ss=[x2-1,x2,x2+1]; tt=[uu(x2-1),uu(x2),uu(x2+1)]; (116—)p=polyfit(ss,tt,n);其中的ss=[3006 3007 3008] tt =240.37292002942124 243.01899011713977 241.8321667762827] 程序中n=2,我觉得可能是因为曲线对应的多项式次数不够,不过用三个点来确定一条二次抛物线完全合理的!!可是改为n=3时,又有这样的提示: Warning: Polynomial is not unique; degree >= number of data points. > In polyfit at 72:: warning('MATLAB ![]() 'Polynomial is not unique; degree >= number of data points.') |
![]() |
![]() |