title: Octave, finding the maximum of a numeric function
body: <p>I am trying to compute the maximum value of the solution of a system with two ODEs using Octave. I have firstly solved the system itself:</p>
  
  <pre><code>function xdot = f (x,t)
  
  a1=0.00875;
  a2=0.075;
  b1=7.5;
  b2=2.5;
  d1=0.0001;
  d2=0.0001;
  g=4*10^(-8);
  K1=5000;
  K2=2500;
  n=2;
  m=2;
  
  xdot = zeros(2,1);
  
  xdot(1) = a1+b1*x(1)^n/(K1^n+x(1)^n)-g*x(1)*x(2)-d1*x(1);
  xdot(2) = a2+b2*x(1)^m/(K2^m+x(1)^m)-d2*x(2);
  
  endfunction
  
  t = linspace(0, 5000, 200)';
  x0 = [1000; 1000];
  x = lsode ("f", x0, t);
  
  set term dumb;
  plot(t,x); 
  </code></pre>
  
  <p>But now I do not know how to compute the maximum value of the two functions (numerical ones) obtained as solutions of the system. I have searched in the Internet but I haven't found what I want... I only have found the function fminbnd for the minimum of a function on an interval...</p>
  
  <p>Is it possible to compute the maximum value of a numeric function with Octave?</p>