title: How to find max value of variable function with 2 constant parameters?
body: <p>I'm trying to find the maximum value of a function using <code>fminbnd</code>. I have used it with simple functions like <code>f(x) = x^2+2*x</code> so to find the minimum value I do <code>fminbnd(f,-10,10)</code>. To find the maximum value I just have to do <code>fminbnd(-f,-10,10)</code>.</p>
  
  <p>Now I have another function with 3 variables but I want 2 of them to be constant:</p>
  
  <pre><code>f(Q,m,Fx) = (Fx^2*(m-1))/sqrt( (m*Fx^2-1)^2 + (Fx^2*(Fx^2-1)^2*(m-1)^2*Q^2) )
  </code></pre>
  
  <p>I'm currently plotting it using <code>ezplot(f(q,m,Fx), [0 8 0 3])</code> being <code>q</code> and <code>m</code> constant values. If a try to get the maximum value with <code>fminbnd(-f(q,m,Fx),0,8)</code> it gives me an error.</p>
  
  <p>How can I find the maximum value of this function?</p>