Thread Subject: Quantile function in Simulink

Subject: Quantile function in Simulink

From: Steve Ratts

Date: 10 Sep, 2008 22:56:02

Message: 1 of 2

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’ve used the Simulink profiler to identify which functions are taking the most time, and I’m looking at replacing them with subsystems composed of native Simulink blocks. One problem I’m having is that I haven’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


Subject: Quantile function in Simulink

From: witek@mathworks.com

Date: 11 Sep, 2008 02:02:53

Message: 2 of 2

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’ve used the Simulink profiler to identify which functions are taking the most time, and I’m looking at replacing them with subsystems composed of native Simulink blocks. One problem I’m having is that I haven’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
>
>

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
simulink quanti... Steve Ratts 10 Sep, 2008 19:00:07
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com