% P5
% Test Script for RateOfChange

clc
% An ill-conditioned system with a known solution...
n = 8;
A = hilb(n);
b = A*ones(n,1);
x = A\b
% Rate of change of x(3) given that we tweak the (n,n) entry of A...
E = zeros(n,n); E(n,n) = 1;
alfa = RateOfChange(A,E,b,3)