Line | |
---|
1 | function sys = parvar(varargin) |
---|
2 | %PARVAR Create symbolic parametric variable |
---|
3 | % |
---|
4 | % PAPRVAR works exactly as SDPVAR, with the only difference that |
---|
5 | % the elements in the variable automatically will be defined |
---|
6 | % as parametric variables (for a multi-parametric program) |
---|
7 | % |
---|
8 | % See also PARAMETRIC, INTVAR, BINVAR, SDPVAR, BINARY, INTEGER |
---|
9 | |
---|
10 | % Author Johan Löfberg |
---|
11 | % $Id: parvar.m,v 1.2 2004/07/09 14:29:39 johanl Exp $ |
---|
12 | |
---|
13 | switch nargin |
---|
14 | case 1 |
---|
15 | sys = sdpvar(varargin{1}); |
---|
16 | case 2 |
---|
17 | sys = sdpvar(varargin{1},varargin{2}); |
---|
18 | case 3 |
---|
19 | sys = sdpvar(varargin{1},varargin{2},varargin{3}); |
---|
20 | case 4 |
---|
21 | sys = sdpvar(varargin{1},varargin{2},varargin{3},varargin{4}); |
---|
22 | otherwise |
---|
23 | error('Wrong number of input arguments. See help-text for sdpvar') |
---|
24 | end |
---|
25 | |
---|
26 | yalmip('setparvariables',[yalmip('parvariables') getvariables(sys)]); |
---|
Note: See
TracBrowser
for help on using the repository browser.