Orthogonal Linear Regression

버전 1.0.0.0 (586 Bytes) 작성자: Per Sundqvist
Fits a line y=p0+p1*y to a dataset (xdata,ydata) in an orthogonal way.
다운로드 수: 5.4K
업데이트 날짜: 2005/1/13

라이선스 없음

% Orthogonal linear least square fit of xdata and ydata vectors
% p=linortfit(xdata,ydata) gives the the coefficient-vector p that
% corresponds to the linear expression: y=p(1)+p(2)*x, where p
% is minimized with respect to the objective function
% sum((p(1)+p(2)*xdata-ydata).^2/(1+p(2)^2)).
%
% Example:
%
% %prepare some data
% xdata=0:0.1:10;
% ydata=2+7*xdata+6*randn(size(xdata));
% %orthogonal linear fit
% p=linortfit(xdata,ydata)
% yy=p(1)+p(2)*xdata;
% %compare with normal linear regression
% p0=polyfit(xdata,ydata,1);
% yy0=polyval(p0,xdata);
% %plot to compare data with linear fits
% plot(xdata,ydata,'.',xdata,yy,xdata,yy0,':');

인용 양식

Per Sundqvist (2026). Orthogonal Linear Regression (https://kr.mathworks.com/matlabcentral/fileexchange/6716-orthogonal-linear-regression), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R13SP1
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Linear and Nonlinear Regression에 대해 자세히 알아보기
도움

도움 준 파일: Orthogonal Linear Regression

버전 게시됨 릴리스 정보
1.0.0.0