haha! Funny you should suggest this now. We've just had a meeting about this string length limitation and the porting teams has decided that we will use global variables to solve it. As a stop-gap (and to prevent matlab from dying for unknown reasons), I've checked-in a version of the PFB to SVN that brings up a warning box when the maximum string length is exceeded. There is also an option to round- off coefficients now and save some space (else the string contains 15 significant decimal places, which is excessive for most 8-bit applications).

Andrew Martens will be writing a guide for building future blocks, which will mandate global variables for long strings and scripts to build the blocks from scratch. It will probably include a template to help guys get started. This will demonstrate the preferred method of passing variables to sub-blocks etc. Also, I think safety checks (like the afore-mentioned string length limit) are essential. Crashing Matlabs are not cool.

Any further ideas?

Jason



On 21 May 2008, at 02:05, G Jones wrote:

Hi,
This code seems to work for making long PFBs with the green blocks. It
could probably be improved, but at least it's functional. Basically it
assigns the 'buf' variable that contains the PFB coefficients to a
unique name in the base Matlab workspace. I couldn't manage to get it
to work assigning it in any other namespace. The unique name I chose
is just related to the current time, so is meaningless. A more
meaningful unique name could probably be constructed, but this was
easy. Let me know if anyone has a better fix for this problem.
Glenn
<pfb_coeff_gen_init.m>


Reply via email to