val_full = rand(28, 1);
val_sub = [val_full(1:3); NaN; val_full(5:8); NaN; ...
      val_full(12:18); NaN; val_full(24:28)];
x_near = 0.5;

ind_nan = find(isnan(val_sub));
pos_nan = (val_sub(ind_nan-1) + val_sub(ind_nan+1))/2;
[junk, nan_count] = min((x_near - pos_nan).^2);

val_map = val_full;



        vec_mag = (x - xdat{han_cont}).^2 + (y - ydat{han_cont}).^2;
      [junk, i_point] = min(vec_mag);
