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
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.