function result = nc_cf_bounds2cor_test

OK = [];

% vectors

   a = [1 2 3 4];
   b = [1 2 3 4]';
   
   bc=nc_cf_cor2bounds(b); 
   ac=nc_cf_cor2bounds(a);
   
   OK(end+1) = all(all(ac==[1 2 3;2 3 4]));
   OK(end+1) = all(all(bc==[1 2;2 3;3 4]));
   
% undefined case

   try
   
   nc_cf_bounds2cor([nan nan;nan nan])
   
   catch
   OK(end+1) = 1;
   end

   result = all(OK);