You can use ndgrid to create K and C:
[K C] = ndgrid(2:12,1:10);
then use logical indexing to calculate the separate parts:
z=zeros(11,10);
ind = K>=(2*C);
z(~ind) = K(~ind);
z(ind) = K(ind)+2*C(ind);
then plot any way you want:
surf(C,K,z);
or
image(z);
and others....