<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235843</link>
    <title>MATLAB Central Newsreader - Quantile function in Simulink</title>
    <description>Feed for thread: Quantile function in Simulink</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>Wed, 10 Sep 2008 22:56:02 -0400</pubDate>
      <title>Quantile function in Simulink</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235843#599768</link>
      <author>Steve Ratts</author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
I've got a Simulink model of a video processor which I've based on an existing model developed in MATLAB. The Simulink model makes extensive use of Embedded MATLAB blocks (it seemed the quickest way to get my MATLAB code into Simulink). Some of the blocks are taking a very long time to execute, and consequently the Simulink version runs more than an order of magnitude slower than the same code in MATLAB. I believe part of the problem is my heavy use of EML, and in particular the functions I have that call the MATLAB quantile function.&lt;br&gt;
&lt;br&gt;
I&amp;#8217;ve used the Simulink profiler to identify which functions are taking the most time, and I&amp;#8217;m looking at replacing them with subsystems composed of native Simulink blocks. One problem I&amp;#8217;m having is that I haven&amp;#8217;t found a Simulink equivalent to the MATLAB quantile function. Do any of you know of any equivalent block in Simulink that can take a vector and a percentile and output the corresponding quantile?&lt;br&gt;
&lt;br&gt;
Steve</description>
    </item>
    <item>
      <pubDate>Thu, 11 Sep 2008 02:02:53 -0400</pubDate>
      <title>Re: Quantile function in Simulink</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235843#599786</link>
      <author>witek@mathworks.com</author>
      <description>Hi Steve,&lt;br&gt;
&lt;br&gt;
I don't know of an equivalent block in Simulink, but I have suggestions that might help you with performance.&lt;br&gt;
If you are not calling the code using eml.extrinsic setup, then go to the Debug configuration of your EML block&lt;br&gt;
and turn off debugging (if you have not done so already).  This should help.  Furthermore, under Simulation-&amp;gt;&lt;br&gt;
configuration parameters-&amp;gt; optimization-&amp;gt;compiler optimization level turn on the optimizations.  At this point&lt;br&gt;
try to run the model in accelerated mode. This may give you another level of boost in performance.&lt;br&gt;
&lt;br&gt;
Finally, you could construct quantile from more elementary Simulink blocks.&lt;br&gt;
&lt;br&gt;
HTH,&lt;br&gt;
&lt;br&gt;
Witek&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Steve Ratts &amp;lt;sdratts.remove.this@raytheon.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I've got a Simulink model of a video processor which I've based on an existing model developed in MATLAB. The Simulink model makes extensive use of Embedded MATLAB blocks (it seemed the quickest way to get my MATLAB code into Simulink). Some of the blocks are taking a very long time to execute, and consequently the Simulink version runs more than an order of magnitude slower than the same code in MATLAB. I believe part of the problem is my heavy use of EML, and in particular the functions I have that call the MATLAB quantile function.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I&amp;#8217;ve used the Simulink profiler to identify which functions are taking the most time, and I&amp;#8217;m looking at replacing them with subsystems composed of native Simulink blocks. One problem I&amp;#8217;m having is that I haven&amp;#8217;t found a Simulink equivalent to the MATLAB quantile function. Do any of you know of any equivalent block in Simulink that can take a vector and a percentile and output the corresponding quantile?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Steve&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; </description>
    </item>
  </channel>
</rss>

