error using mpc.mpc

I recently upgraded from the 2008 researcher/faculty version of Matlab to the 2010 res/fac version. Scripts involving M-SSA worked on my former version of Matlab, but not on the new one. I have ensured all relevant paths are established. A professor suggested I remove the mpc from the path. This did not change the situation. To date, nothing has enabled the script to be read when the following command is entered: [Teof,Var,Tpc,Rc]=mssa(xx,20,'BK',0.05,0.9); Does anyone have a suggestion? Thanks. (An abbreviated ex of the error message: error using ==> mpc.mpc......first input argument of the "mpc" command....)

Answers (2)

Since it is not clear exactly what commands are being invoked inside your script "mssa", I would recommend running one of the MPC demos. You can access these by running the following command from the MATLAB prompt:
demo('toolbox','Model Predictive Control')
Once you have isolated the exact command that causes the error, please post the command and error.
John
John on 21 Mar 2011

0 votes

I have been working with Marcia on this issue. The original script that used MSSA was written to be used with an older version of matlab. There are differences between the mpc code for matlab 2008 and 2010 (specifically, the 2010 uses a varargin structure, while 2008 mpc simply takes in X and E as numerical arguments). I simply saved the 2008 mpc code into a folder within the matlab path as mpc1, and changed the MSSA function code to call mpc1 rather than mpc. The script works fine now.
- John

Products

Tags

Asked:

on 19 Mar 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!