AMATH 352
Summer Quarter, 2008
>> [Q,R] = myqr(A)to the output you get from Matlab's built-in QR routine by entering
>> [Q,R] = qr(A,0)There may be some differences in sign, owing to the fact that each column of Q represents a direction, and can have its sign flipped without changing anything. But other than that, the two should be the same.
If you end up needing extra parentheses, each extra pair (left and right) will cost you 2 points, out of 10 total for the problem.
>> [x,y] = noisypower(numpoints);where numpoints is the number of points to use.
Once you've found C and p, inspect your fit visually:
>> plot(x, y, '*') >> hold on >> plot(x, C*x.^p, 'r') >> hold off
>> [x,y] = noisypoly(degree,numpoints);Here degree is the degree of the polynomial, and numpoints is the number of points to generate.