f



Weighted Line of Best Fit

At the moment I am writing code to find the weighted line of best
fit. I can calculate the line of best fit using the code given below,
where sortWLAN corresponds to the entries in an array, which I want
to extract.

onedist = sortWLAN(3,1:100);
onerssi = sortWLAN(4,1:100);
onewgt = sortWLAN(5,1:100);
coeffs = polyfit(onedist,onerssi, coefficient);
curvefit = polyval(coeffs, distance);
hold on
 plot(onedist, onerssi, 'o');
 plot(distance,curvefit, 'r');
hold off

Anybode have any ideas? Cheers
0
brad_512 (2)
9/7/2005 3:51:57 PM
comp.soft-sys.matlab 211266 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
373 Views

Similar Articles

[PageSpeed] 58

Brad wrote:
> At the moment I am writing code to find the weighted line of best
> fit.

You might look at LSCOV.  You will have to create [ones x x.^2 ...] by hand or 
using VANDER, but LSCOV will allow you to make a weighted fit.

Hope this helps.

- Peter Perkins
   The MathWorks, Inc.
0
9/7/2005 5:33:14 PM
Reply: