From: Craig on 1 Jul 2010 21:54 I'm using an older version of Matlab (7.1.0.246) SP3, and want to call 'mpcmove' (part of the MPC Toolbox) from Mmbedded Matlab so that I can take advantage of the full functionality of the MPController. Because it's not part of the supported function calls from EML i'm instead calling another workspace m-function 'my_mpcmove' from within the Embedded block. It resolves fine. However 'mpcmove' needs, as one of its arguments, an extended mpc state object (say xmpc) that needs to be initialised before using mpcmove. The recommended practice is to use xmpc=mpcstate(MPCObj) to initialise it. I've tried doing this in the workspace prior to execution of the simulink model, but I get an interface error that says "Undefined function or variable 'xmpc'". I've tried passing it as a parameter of the embedded block, down through the call to my_mpcmove and then into the mpcmove call, which seems to compile and start to execute fine, but produces an Assertion Error that results in a stack trace dump to the workspace. Can anyone help me or refer me to the thread that can? Thanks, Craig
|
Pages: 1 Prev: FDLS [was Re: Filter design with 'freqsamp' method?] Next: pre-allocation question |