function value = avex(A, t1=0, t2=NaN)

  n1 = point(A, t1);
  n2 = point(A, t2);
  sum = 0;
  
  for row = n1 : n2
    sum = sum + A(row,2);
  endfor
  
  value = sum / (n2 - n1 + 1);
  
endfunction
