<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264847</link>
    <title>MATLAB Central Newsreader - Multiple Anonymous Functions</title>
    <description>Feed for thread: Multiple Anonymous Functions</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 03 Nov 2009 15:55:19 -0500</pubDate>
      <title>Multiple Anonymous Functions</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264847#691746</link>
      <author>Matthias </author>
      <description>Hello,&lt;br&gt;
&lt;br&gt;
in the Matlab Help there is an Example for Multiple Anonymous Functions:&lt;br&gt;
&lt;br&gt;
g = @(c)  (quad(@(x) (x.^2 + c*x + 1), 0, 1))&lt;br&gt;
&lt;br&gt;
g(2)&lt;br&gt;
ans =&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;2.3333&lt;br&gt;
&lt;br&gt;
This works fine. I'd like to be able to call this function with an array of parameters:&lt;br&gt;
g([1,2,3]) &lt;br&gt;
ans = &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;[g(1), g(2), g(3)] &lt;br&gt;
&lt;br&gt;
I do not want to use external m-files and for-loops. Is there any way?&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
Matthias</description>
    </item>
    <item>
      <pubDate>Tue, 03 Nov 2009 16:27:31 -0500</pubDate>
      <title>Re: Multiple Anonymous Functions</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264847#691753</link>
      <author>Steve Eddins</author>
      <description>Matthias wrote:&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; in the Matlab Help there is an Example for Multiple Anonymous Functions:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; g = @(c)  (quad(@(x) (x.^2 + c*x + 1), 0, 1))&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; g(2)&lt;br&gt;
&amp;gt; ans =&lt;br&gt;
&amp;gt;    2.3333&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; This works fine. I'd like to be able to call this function with an array of parameters:&lt;br&gt;
&amp;gt; g([1,2,3]) &lt;br&gt;
&amp;gt; ans = &lt;br&gt;
&amp;gt;    [g(1), g(2), g(3)] &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I do not want to use external m-files and for-loops. Is there any way?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Regards,&lt;br&gt;
&amp;gt; Matthias&lt;br&gt;
&lt;br&gt;
arrayfun</description>
    </item>
  </channel>
</rss>

