* Least squares identification with Matrix manipulation

The problem: We want to write a program that, given in input a file with a list of
current/tension measurements collected on a resistance of a circuit, will be able to calculate a
least squares estimate of the value of the resistance.
We know from the least squares theory, that, if N tension and current measurements are
represented with the vectors V and I
Outline of the main program: The main program will work as follow:
i. Print to the screen information about what the program does.
ii. Ask the user to input the name of the file with the observations.
iii. Read the file and store the observations into two matrices Nx1, one for the
tensions and one for the currents. You can use the sample file “observations.txt”
provided with the assignment or a custom one of your choice (with the same
format though), but the name HAS TO be provided by the user of the program.
The file is a simple text file with two columns, the first corresponds to tension
measurements and the second to current measurements, e.g. (the number of rows,
N, can be any):
12.02 3.02
11.99 2.98
12.00 3.01
... ...
iv. Perform the necessary operations to calculate the least squares estimate of the
resistance. If the matrix I T I has a null determinant, the inverse does not exist and
so the least squares estimate. In this case the program should inform the user and
quit the program.
v. Show the value of the resistance to the user.



I really dont know how to go about this, where to start and how to make heads or tails of it. Its one of our projects and its starting to get imminent, and i really need some help with it. can anyone help?
Topic archived. No new replies allowed.