function val = bicubicw(k1,k2,k3,k4,k5,k6,k7,k8,k9,k10,i1,j1,r,c)
%
% bicubicw: computes the bicubic value with center (i1,j1) and location (r,c)
% On input:
%     k1..k10: bicubic coefficients
%     i1,j1: row, col pixel center location
%     r,c: row, col offset from pixel center (can be non-integer)
% On output:
%     val: bicubic value at requested location
% Call:
%      val = bicubicw(k1,k2,k3,k4,k5,k6,k7,k8,k9,k10,i1,j1,r,c)
%

val  = k1(i1,j1) + r*k2(i1,j1) + c*k3(i1,j1) + ...
       r*r*k4(i1,j1) + r*c*k5(i1,j1) + c*c*k6(i1,j1) +...
       r*r*r*k7(i1,j1) + r*r*c*k8(i1,j1) + ...
       r*c*c*k9(i1,j1) + c*c*c*k10(i1,j1);
