title: Add terms to anonymous function in for loop
body: <p>I am trying to add terms to an anonymous function in a for loop.</p>
  
  <p>Isotherm = @(N) log(N)-log(P);</p>
  
  <p>k=0;
  for an=a
  Isotherm2 = @(N) (1/T)*an*mpower(N,k);
  Isotherm = @(N) Isotherm(N) + Isotherm2(N);
  k=k+1;
  end</p>
  
  <p>k=0;
  for bn=b
  Isotherm2 = @(N) bn*mpower(N,k);
  Isotherm = @(N) Isotherm(N) + Isotherm2(N);
  k=k+1;
  end</p>
  
  <p>I've tried the preceding code, but it is not working correctly.  Do I need to use an m-file function?</p>