Analytical solution for Orthogonal Linear Least Squares in two dimensions
- Downloads:
- Views:
- Rating:

ORTHLLS2D returns the Orthogonal Linear Least Squares estimate for parameters of line a x + b y + c = 0
function f = OrthLLS2D(x, y)
Inputs x and y must be real vectors of equal size.
Output f is the real vector [a b c] where a, b and c are the estimated parameters of the linear equation.
Since a more general function called LINORTFITN has already been submitted to File Exchange (ID number: 16800) in October 2007 by Mr. F. Carr, my file is supposed to be used as a brief introduction to the analytical problem in an extremely simple case.
Orthogonal Least Squares Estimate on a plane, in the simple case of a linear equation, is in fact a problem that can be easily solved analytically with no approximation (see pdf file for detailed explanation). Notice that in the general multidimensional case, an analytical solution may not exist (although Mr. Carr's function is an efficient approximation of the solution).
% ====================================================
% EXAMPLE: HOW TO USE THE FUNCTION
% ====================================================
Build two series, given the linear relation y = mx + q + error
T = 1000; % number of points
m = -1; % slope
q = 1; % intercept
x = randn(T, 1); % random x values
u = randn(T, 1); % random error
y = m * x + q + u; % y = mx + q + error
f = OrthLLS2D(x, y); % estimate [a, b, c] for equation ax + by + c = 0
plot(x, y, '.') % scatter plot for empirical points
hold on
plot(x, [ones(T,1) x] * [-f(3); -f(1)], '*r');% plot orthogonal linear least squares
b1 = regress(y, [ones(T,1) x]); % parameters of the ordinary least squares (y as a function of x)
b2 = regress(x, [ones(T,1) y]); % parameters of the ordinary least squares (x as a function of y)
plot(x, [ones(T,1) x] * b1, '.g'); % plot ordinary least squares (y as a function of x)
plot([ones(T,1) y] * b2, y, '.c'); % plot ordinary least squares (x as a function of y)
% ====================================================
See also LINORTFIT2, LINORTFITN.
Free download from Shareware Connection - ORTHLLS2D returns the Orthogonal Linear Least Squares estimate for parameters of line a x + b y + c = 0
Version: 1.0 | Size: 10 KB | Platform: Matlab, Scripts
Released Date: 12-06-2013 | Rating: 0 | Title: Analytical solution for Orthogonal Linear Least Squares in two dimensions
Author Url: http://www.mathworks.com
Program Info Url: http://www.mathworks.com
Download Url: http://www.mathworks.com/matlabcentral/fx_files/22027/1/OrthLLS2D.zip
Inequality Package - Package on Inequality Metrics such as the Gini Coefficient associated to the Lorenz Curve, the Theil and the Atkinson Indexes.
Correlation Percentiles - CORRPERC performs a bootstrap (of size equal to n_iters) on correlation matrices of input variable Y and computes the percentiles corrsperc (according to input perc) of each correlation
Rankings - The principal function is Rankings.m which can be used to calculate five different kinds of rankings (in ascending order
IND2SUB4UP Subscripts from linear index for upper triangular matrix (only elements above diagonal) - [I, J] = IND2SUB4UP(IND) returns vectors I and J containing
Upside correlation - Y = UPSIDECORRELATION(Y) returns the upside correlation for columns of variable Y
SimpleTest
WordPress Auto Poster Plugin
Professional Simulink Audio Equalizer
PHP Print / Echo
Ends Smart Form
Output buffering, and how it can change your life
ScriptCase - PHP Code Generator
Advanced Istaller for Java
Wind Turbine Model
FORMfields - The PHP Framework
C to C++ Converter
C++ Compiler
RTFGen - the PHP RTF generator
Cumulative Mann-Kendall trend test
Affiliate Programs
Animation
Auctions
Audio Systems
Banner Rotation
Blog
Bulletin Boards & Forums
Business & Enterprise
Buttons
Calendars & Events
Charts & Graphs
Chat
Classified Ad Managers
Communication
Least Squares Java Linear Solver
Least Squares Fit Routine
Least Squares Fit Mysql
Least Squares Fit Source Code
Least Squares Fit Vb Code
Discrete Least-Squares Rational Approximation - Constructs discrete least-squares rational approximations to data using the full-Newton algorithm for solving separable non-linear least-squares problems that was developed in:
Linear Least Squares - This application calculates the angular and linear coefficients of a linear regression considering the Linear Least Squares methodology.
Multiple Coherence Function - For a system having multiple inputs x and outputs y, the partial coherence is the coherence computed between any individual input and the output when the effect of all other inputs is removed from the output by a linear least squares prediction
Evaluate Nelson-Siegel function - Functions NELSONFUN and NELSONFIT evaluate and fit (with non-linear least-squares) the Nelson-Siegel function, a popular yield-curve approximation device.
Orthogonal Least Squares Algorithms for Sparse Signal Reconstruction - OLS - Orthogonal Least Squares: Proposed by T. Blumensath, M. E. Davies
Shareware Connection periodically updates pricing and software information of 'Analytical solution for Orthogonal Linear Least Squares in two dimensions' from company source 'Francesco Pozzi' , so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using 'Analytical solution for Orthogonal Linear Least Squares in two dimensions' crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Analytical solution for Orthogonal Linear Least Squares in two dimensions.
LogmeOnce Password Manager Ultimate - Irrespective of your computer and web usage needs it is quite imperative that you will deal with passwords, in fact plenty of them. Both home and corporate network users need to log in to several web services and sites and for each of them, user ...
Norman Antivirus - There is hardly any computer user who does not require protection from various types of malware and internet based threats these days. Instances of malware creators and hackers breaking into top corporate firms and celebrity websites can send a ...
IDrive Classic - For every type of computer user, backing up data has become near compulsory. Apart from data loss caused by hardware snags, you cannot rule out the risk of data loss caused by malware attacks. That explains why millions of PC users back up their ...
PCMark 8 - Not every PC user would have penchant for running new benchmarks and benchmarking software in their computers. It is only hardcore gamers and seasoned users who like tinkering around with various settings in PC benchmarking tools. Such apps also ...
MacPilot - The Mac OS contains many advanced features that can make computing a different experience altogether. However, not all Mac users are aware of such deep rooted features of the Apple OS. The usual surface customizations are what most of them remain ...
KeePass Password Safe - Using password becomes mandatory for performing various online operations, at both home and workplace. For accessing email accounts, shopping online, making banking transactions and similar tasks it is necessary to use user ids and passwords ...
Screenshot Captor - Nowadays, a lot of Windows users need to take screenshots for professional and personal usage needs. It may be required to share an interesting image from web site or part of web pages with friends, making tutorials etc. However, freeware screen ...
Pixelmator - There is no denying the fact that Mac users are often left with fewer third party app choices than those who use Windows based PCs. However, when it comes to imaging, the situation is a little better. If you want a versatile image editor for Mac ...
CleanMyDrive - PC experts unanimously agree that using Macs tend to be a smoother and faster experience than running Windows based PCs but the Apple laptops and desktops also need maintenance and performance tweaking, occasionally. Regular web browsing, ...
Adobe Media Encoder - Almost every PC user faces a situation where he or she needs to convert an audio or video file fast into a format of choice. There are several free and commercial apps, but the abundance of options can actually make selection difficult. If you ...
