www.gusucode.com > mpc 案例源码 matlab代码程序 > mpc/RemoveAllCustomConstraintsFromMPCControllerExample.m

    %% Remove All Custom Constraints from MPC Controller
%% 
% Define a plant model and create an MPC controller.
plant = rss(3,2,2);
plant.D = 0;
MPCobj = mpc(plant,0.1);

%%
% Define controller custom constraints. 
E = [-1 2; 1 -2];
F = [0 1; 0 -1];
G = [0; 10];
setconstraint(MPCobj,E,F,G)

%%
% Remove the custom constraints.
setconstraint(MPCobj)