function D = difference(V)

  sz = size(V);
  if (sz(2) > sz(1))
    D = [0; diff(V)']';
  else
    D = [0 diff(V)']';
  endif
  
endfunction
