title: Why is fgoalattain built-in function not working in MATLAB?
body: <p>I'm trying to invoke an <code>fgoalattain</code> function (computing a function minimum with a goal-attainment algorithm) in MATLAB. According to documentation, it should look like this:</p>
  
  <pre><code>[X,FVAL,ATTAINFACTOR] = FGOALATTAIN(@objf_1,x0,goal,weight)
  </code></pre>
  
  <p>where <code>@objf_1</code> is a function handle for a function defined in <code>objf_1</code> m-file and the rest are some arguments I set on my own. They are not important in any case, because evidently MATLAB has a problem with that function, as it throws:</p>
  
  <pre><code>&gt;&gt; rospar_4
  Undefined function 'fgoalattain' for input arguments of type 'function_handle'.
  
  Error in rospar_4 (line 29)
  [X,FVAL,ATTAINFACTOR] = fgoalattain(@objf_1,x0,goal,weight)
  </code></pre>
  
  <p>However, I already know that the function works fine on another MATLAB version - R2011b (the one I'm using is R2012b), but with first argument as <code>char</code> instead:</p>
  
  <pre><code>[X,FVAL,ATTAINFACTOR] = fgoalattain('objf_1',x0,goal,weight)
  </code></pre>
  
  <p>If I try to invoke it like this in mine though, the error is almost the same:</p>
  
  <pre><code>&gt;&gt; rospar_4
  Undefined function 'fgoalattain' for input arguments of type 'char'.
  
  Error in rospar_4 (line 29)
  [X,FVAL,ATTAINFACTOR] = fgoalattain('objf_1',x0,goal,weight)
  </code></pre>
  
  <p>Any idea how am I getting this?</p>