简体   繁体   中英

Cannot use some Matlab MPC Toolbox functions

I'm trying to use for example setoutdist Matlab function from the MPC Toolbox (I'm using Matlab R2013a on Windows 8.1). As a response I'm receiving:

    Undefined function 'setoutdist' for input arguments of type 'ss'.

I am able to get help about this function using help setoutdist . When I'm typing the function name and left parenthesis I'm receiving prompt with list of the arguments. When I'm using which setoutdist -all I'm receiving proper output:

C:\Program Files\MATLAB\R2013a\toolbox\mpc\mpc\@mpc\setoutdist.m  % mpc method code here

But the function doesn't work even in default Matlab path, so I don't think it is shadowed. The same is with the other functions, for example setindist , setestim , mpc_struct , etc. but mpc , mpcstate and mpcmove functions works correctly.

I was trying: clear all , clear classess , rehash toolbox , rehash pathreset , rehash toolboxreset , restoring default paths using pathtool . I've blocked the antivirus and added exeptions to it's list. I've even reinstalled my Matlab, nothing helped.

Maybe this is significant: when I'm trying to edit the setoutdist.m I'm receiving message that access is denied.

I will extremly appreciate any help...

How are you calling setoutdist ? The correct syntax is one of the three (see documentation - for R2014b):

setoutdist(MPCobj,'integrators')
setoutdist(MPCobj,'remove',channels)
setoutdist(MPCobj,'model',model)

where MPCobj is a Model Predictive Controller object, created for example with the mpc function. It looks like from the error message that you are calling the function with a state-space object, which is not allowed (I'm guessing).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM