title: Solving ODEs with Matlab, with varying Parameters
body: <p>Lets say I have a simple logistic equation</p>
  
  <p><em>dx/dt = 2ax(1 - x/N)</em> 
  where <strong><em>N</em></strong> is the carrying capacity, <strong><em>a</em></strong> is some growth rate, and both <strong><em>a</em></strong> and <strong><em>N</em></strong> are parameters I'd like to vary.</p>
  
  <p>So what I want to do is to plot a 3D graph of my fixed point and the two parameters.</p>
  
  <p>I understand how to find a fixed point of a single parameter.</p>
  
  <p>Here is my sample code</p>
  
  <pre><code>function xprime = MyLogisticFunction(t,X) %% The ODE
  
  % Parameters
  N = 10 % Carrying Capacity
  a = 0.5 % Growth Rate
  
  x1prime = 2*a*X(1)*(1 - X(1)/N );
  
  xprime = [x1prime ]';
  
  end
  </code></pre>
  
  <p>Next my solver</p>
  
  <pre><code>% Initial Number 
  x0 = 0.4;
  
  %Time Window
  tspan=[0 100];
  
  [t,x]=ode45(@MyLogisticFunction,tspan,x0);
  
  clf
  
  x(end,1) % This gives me the fixed point for the parameters above.
  </code></pre>
  
  <p>So my real question is, how do I put a <em>for loop</em> across two functions, that allows me to vary <strong><em>a</em></strong> and <strong><em>N</em></strong>, so that I can plot out a 3D graph of <strong><em>a</em></strong> and <strong><em>N</em></strong> and my fixed point x*.</p>
  
  <p>I've tried combining both functions into one .m file but it does not seem to work</p>