Thread Subject: Are Level-2 M-file S-functions slower than the Level-1?

Subject: Are Level-2 M-file S-functions slower than the Level-1?

From: posturas

Date: 12 Dec, 2008 11:33:43

Message: 1 of 2

Hello!

Recently, I needed to update a level-1 m-file s-function to a level-2 equivalent. Both (level-1 and level-2) work exactly the same, however the level-2 is much slower. For instance, the update (of the level-2) is about 50% slower.

First I thought that something was wrong with the my code. However, now it starts to be clear that the level-2 m-file s-functions manage the inputs and parameters much slower than the level-1 s-functions. Specially, when I found the same thing happens for the demos provided with matlab: the unit delay "msfcn_unit_delay.m" is near three times slower than "sfundsc2.m".

So, is there any solution to make level-2 m-file s-functions run as fast as level? Or is this speed problem related with my matlab version (R2007a)?

Thanks for the help.

Subject: Are Level-2 M-file S-functions slower than the Level-1?

From: Michael

Date: 12 Dec, 2008 13:59:03

Message: 2 of 2

As far as I know the Level2 M-file S-Function is the slowest S-Function of all. The difference factor in the performance of 2 - 3 to the Level1 M-file S-Function seems to be okay. You as user cannot improve that performance

Tags for this Thread

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.

rssFeed for this Thread

Contact us at files@mathworks.com