| Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) | 
![]()  | 
	
| 		
			
			 | 
		#1 | 
| 
			
			 初级会员 
			
			
			
			注册日期: 2011-04-29 
				
				
				
					帖子: 6
				 
				
				
				声望力: 0 ![]()  | 
	
	
	
		
		
			
			 
			
			我用polufit算出结果中有df:和nor     
		
		
		
		
		
		
		
	不知道它们怎么用  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 		
			
			 | 
		#2 | 
| 
			
			 高级会员 
			
			
			
			注册日期: 2008-05-13 
				
				年龄: 45 
				
					帖子: 232
				 
				
				
				声望力: 22 ![]()  | 
	
	
	
		
		
			
			 
			
			Matlab Help中对polyfit的说明很详细: 
		
		
		
		
		
		
			p = polyfit(x,y,n) finds the coefficients of a polynomial p(x) of degree n that fits the data, p(x(i)) to y(i), in a least squares sense. The result p is a row vector of length n+1 containing the polynomial coefficients in descending powers [p,S] = polyfit(x,y,n) returns the polynomial coefficients p and a structure S for use with polyval to obtain error estimates or predictions. Structure S contains fields R, df, and normr, for the triangular factor from a QR decomposition of the Vandermonde matrix of X, the degrees of freedom, and the norm of the residuals, respectively. If the data Y are random, an estimate of the covariance matrix of P is (Rinv*Rinv')*normr^2/df, where Rinv is the inverse of R. If the errors in the data y are independent normal with constant variance, polyval produces error bounds that contain at least 50% of the predictions. [p,S,mu] = polyfit(x,y,n) finds the coefficients of a polynomial in where and . mu is the two-element vector . This centering and scaling transformation improves the numerical properties of both the polynomial and the fitting algorithm. 你所说的df和nor我不清楚是什么,实际上这个函数的目的就是用多项式模型对实际数据(x,y)进行拟合,拟合的结果是多项式各项的系数,当然还可给出拟合后数据的方差和期望等信息 
				__________________ 
		
		
		
		
	工科'985'博士,(图像处理、分析及理解;模式识别;运动估计;数据分析等)定做程序、算法实现--qq:752105755  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 |