Share
Explore BrainMass

Matlab : Linear Least-Squares Fit

I need a Matlab Script for Linear Square fit.

Write Linear Square fit mat lab script

Input X1, X2 ............................Xn
Y1, Y2..............................Yn

Representing order pairs (X1, Y1) (X2, Y2) ........ (Xn, Yn)

Output should a0 and a1 from page 484

I attached few description pages.

Attachments

Solution Preview

There are two files now attached.

lsq2.m is a function that takes input as you describe ...

Solution Summary

A Matlab scrpt is provided for linear least squares is investigated. The solution is detailed and well presented. The response received a rating of "5/5" from the student who originally posted the question.

$2.19