From: Giorgio on
"Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <htp9le$epg$1(a)fred.mathworks.com>...
> "Giorgio " <christianjp(a)inwind.it> wrote in message <htp8ls$d5s$1(a)fred.mathworks.com>...
>
> > i would like to find out the OLS slope that passes through the smallest x, and highest y.. i.e. passing through min(x), max(y).
> =====
>
> I must be missing something. In the data you've given min(x) and max(y) occur at 2 separate points. So, if this is to be a linear fit passing through these 2 points, then those 2 points constrain the line completely, irrespective of the rest of data. Just connect them with a line and you're done.

Apologies. In this example, the OLS regression should pass through point(-0.651047629509525,-0.806235701025338), second row for each vector (ignore first data point and in my post above x should be y and vice versa).