Path: news.mathworks.com!not-for-mail
From: witek@mathworks.com
Newsgroups: comp.soft-sys.matlab
Subject: Re: Quantile function in Simulink
Date: Thu, 11 Sep 2008 02:02:53 +0000 (UTC)
Organization: The MathWorks, Inc., Natick, MA 01760
Lines: 25
Message-ID: <ga9u8d$jm9$1@fred.mathworks.com>
References: <ga9ja2$t18$1@fred.mathworks.com>
NNTP-Posting-Host: glider.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1221098573 20169 144.212.109.213 (11 Sep 2008 02:02:53 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 11 Sep 2008 02:02:53 +0000 (UTC)
User-Agent: tin/1.9.2-20070201 ("Dalaruan") (UNIX) (Linux/2.6.18-4-amd64 (x86_64))
Xref: news.mathworks.com comp.soft-sys.matlab:489694



Hi Steve,

I don't know of an equivalent block in Simulink, but I have suggestions that might help you with performance.
If you are not calling the code using eml.extrinsic setup, then go to the Debug configuration of your EML block
and turn off debugging (if you have not done so already).  This should help.  Furthermore, under Simulation->
configuration parameters-> optimization->compiler optimization level turn on the optimizations.  At this point
try to run the model in accelerated mode. This may give you another level of boost in performance.

Finally, you could construct quantile from more elementary Simulink blocks.

HTH,

Witek


Steve Ratts <sdratts.remove.this@raytheon.com> wrote:
> Hi,
> 
> 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.
> 
> I&#8217;ve used the Simulink profiler to identify which functions are taking the most time, and I&#8217;m looking at replacing them with subsystems composed of native Simulink blocks. One problem I&#8217;m having is that I haven&#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?
> 
> Steve
> 
>