%  This script begins programming assignment 3 part a
%
%  Put the file file-1.dat in your working directory.

format long
phi=inline('[1,x,x^2,x^3]');
fid=fopen('file-1.dat','r');
n=fscanf(fid,'%d',1);
disp(sprintf('Reading %d data points:',n));
for j=1:n
	xys=fscanf(fid,'%g %g %g',3);
	Atilde(j,:)=feval(phi,xys(1))/xys(3);
	ytilde(j,1)=xys(2)/xys(3);
end
fclose(fid);
