<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/165717</link>
    <title>MATLAB Central Newsreader - evaluating expressions obtained from UI. eval alternative</title>
    <description>Feed for thread: evaluating expressions obtained from UI. eval alternative</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>Sat, 15 Mar 2008 04:00:38 -0400</pubDate>
      <title>evaluating expressions obtained from UI. eval alternative</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/165717#421011</link>
      <author>Ilya </author>
      <description>I often write user interfaces that require user to input&lt;br&gt;
analytical functions into edit boxes.&lt;br&gt;
But I haven't found a MATLAB function specificially designed&lt;br&gt;
to handle the scenario.&lt;br&gt;
&lt;br&gt;
I tried different ways to acoomplish this:&lt;br&gt;
1. I tried the subs function from symbolic math toolbox -&lt;br&gt;
it's roubust, but is veeeery slow ((&lt;br&gt;
&lt;br&gt;
2. Now I use eval. But it requires users to input&lt;br&gt;
expressions using non-matrix operators like .+ .* etc.&lt;br&gt;
Moreover, eval is not robust at all: users are able to&lt;br&gt;
execute almost any MATLAB command inside my UI. Yet, eval is&lt;br&gt;
not as fast as I want.&lt;br&gt;
&lt;br&gt;
Any suggestions?&lt;br&gt;
TIA</description>
    </item>
    <item>
      <pubDate>Sat, 15 Mar 2008 18:39:05 -0400</pubDate>
      <title>Re: evaluating expressions obtained from UI. eval alternative</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/165717#421073</link>
      <author>Dan Haeg</author>
      <description>&quot;Ilya &quot; &amp;lt;ilyapoz@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;frfhl6$6ov$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I often write user interfaces that require user to input&lt;br&gt;
&amp;gt; analytical functions into edit boxes.&lt;br&gt;
&amp;gt; But I haven't found a MATLAB function specificially designed&lt;br&gt;
&amp;gt; to handle the scenario.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I tried different ways to acoomplish this:&lt;br&gt;
&amp;gt; 1. I tried the subs function from symbolic math toolbox -&lt;br&gt;
&amp;gt; it's roubust, but is veeeery slow ((&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 2. Now I use eval. But it requires users to input&lt;br&gt;
&amp;gt; expressions using non-matrix operators like .+ .* etc.&lt;br&gt;
&amp;gt; Moreover, eval is not robust at all: users are able to&lt;br&gt;
&amp;gt; execute almost any MATLAB command inside my UI. Yet, eval is&lt;br&gt;
&amp;gt; not as fast as I want.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Any suggestions?&lt;br&gt;
&amp;gt; TIA&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
could you use inline?</description>
    </item>
    <item>
      <pubDate>Sat, 15 Mar 2008 19:32:14 -0400</pubDate>
      <title>Re: evaluating expressions obtained from UI. eval alternative</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/165717#421079</link>
      <author>Arthur G</author>
      <description>On 2008-03-15 14:39:05 -0400, &quot;Dan Haeg&quot; &amp;lt;haegd@msoe.edu&amp;gt; said:&lt;br&gt;
&lt;br&gt;
&amp;gt; &quot;Ilya &quot; &amp;lt;ilyapoz@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;lt;frfhl6$6ov$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;&amp;gt; I often write user interfaces that require user to input&lt;br&gt;
&amp;gt;&amp;gt; analytical functions into edit boxes.&lt;br&gt;
&amp;gt;&amp;gt; But I haven't found a MATLAB function specificially designed&lt;br&gt;
&amp;gt;&amp;gt; to handle the scenario.&lt;br&gt;
&amp;gt;&amp;gt; &lt;br&gt;
&amp;gt;&amp;gt; I tried different ways to acoomplish this:&lt;br&gt;
&amp;gt;&amp;gt; 1. I tried the subs function from symbolic math toolbox -&lt;br&gt;
&amp;gt;&amp;gt; it's roubust, but is veeeery slow ((&lt;br&gt;
&amp;gt;&amp;gt; &lt;br&gt;
&amp;gt;&amp;gt; 2. Now I use eval. But it requires users to input&lt;br&gt;
&amp;gt;&amp;gt; expressions using non-matrix operators like .+ .* etc.&lt;br&gt;
&amp;gt;&amp;gt; Moreover, eval is not robust at all: users are able to&lt;br&gt;
&amp;gt;&amp;gt; execute almost any MATLAB command inside my UI. Yet, eval is&lt;br&gt;
&amp;gt;&amp;gt; not as fast as I want.&lt;br&gt;
&amp;gt;&amp;gt; &lt;br&gt;
&amp;gt;&amp;gt; Any suggestions?&lt;br&gt;
&amp;gt;&amp;gt; TIA&lt;br&gt;
&amp;gt;&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; could you use inline?&lt;br&gt;
&lt;br&gt;
Also, you might find the &quot;vectorize&quot; function helpful. It will take a &lt;br&gt;
string or inline function and convert operations like &quot;*&quot; into &quot;.*&quot;.</description>
    </item>
    <item>
      <pubDate>Sat, 15 Mar 2008 20:14:01 -0400</pubDate>
      <title>Re: evaluating expressions obtained from UI. eval alternative</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/165717#421086</link>
      <author>Ilya </author>
      <description>&amp;gt; &amp;gt; could you use inline?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Also, you might find the &quot;vectorize&quot; function helpful. It&lt;br&gt;
will take a &lt;br&gt;
&amp;gt; string or inline function and convert operations like &quot;*&quot;&lt;br&gt;
into &quot;.*&quot;.&lt;br&gt;
&lt;br&gt;
Thank you very much! Wonder, why I haven't heard anything&lt;br&gt;
about the &quot;inline&quot; func ((</description>
    </item>
    <item>
      <pubDate>Sat, 15 Mar 2008 20:42:04 -0400</pubDate>
      <title>Re: evaluating expressions obtained from UI. eval alternative</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/165717#421087</link>
      <author>Ilya </author>
      <description>&amp;gt; could you use inline?&lt;br&gt;
Well, according to the profiler, inline is even slower than&lt;br&gt;
eval.</description>
    </item>
  </channel>
</rss>

