function obj = phiVasicek(T,R,z,r0)

%obj = (a - x^b)^2;

obj = 0;

[n m] = size(R);

a = z(1);

b = z(2);

sigma = z(3);

for i = 2:n
	 obj = obj + (R(i) - Vasicek(T(i) - T(1),a,b,sigma,r0))^2;
end
         
endfunction