plateform
stringclasses
1 value
repo_name
stringlengths
13
113
name
stringlengths
3
74
ext
stringclasses
1 value
path
stringlengths
12
229
size
int64
23
843k
source_encoding
stringclasses
9 values
md5
stringlengths
32
32
text
stringlengths
23
843k
github
EnricoGiordano1992/LMI-Matlab-master
rounder.m
.m
LMI-Matlab-master/yalmip/modules/global/rounder.m
5,889
utf_8
88ad60f43086ef44b94f4f9d1011a82a
function [upper,x_min] = rounder(p,relaxedsolution,prelaxed) % Extremely simple heuristic for finding integer % solutions. % % Rounds up and down, fixes etc. % This was the relaxed solution x = relaxedsolution.Primal; % Assume we fail upper = inf; x_min = x; % These should be integer intvars = [p.integer_variables(...
github
EnricoGiordano1992/LMI-Matlab-master
initializesolution.m
.m
LMI-Matlab-master/yalmip/modules/global/initializesolution.m
2,998
utf_8
792f46b6b802380d0b130505eeda93a4
function [p,x_min,upper] = initializesolution(p); x_min = zeros(length(p.c),1); upper = inf; if p.options.usex0 x = p.x0; z = evaluate_nonlinear(p,x); residual = constraint_residuals(p,z); relaxed_feasible = all(residual(1:p.K.f)>=-p.options.bmibnb.eqtol) & all(residual(1+p.K.f:end)>=p.options.bmibnb.p...
github
EnricoGiordano1992/LMI-Matlab-master
mpt_solvenode.m
.m
LMI-Matlab-master/yalmip/modules/parametric/mpt_solvenode.m
4,757
utf_8
5ba2e2ea43c2ecbf8cfb0336f50e41a9
function model = mpt_solvenode(Matrices,lower,upper,OriginalModel,model,options) % This is the core code. Lot of pre-processing to get rid of strange stuff % arising from odd problems, big-M etc etc Matrices.lb = lower; Matrices.ub = upper; % Remove equality constraints and trivial stuff from big-M [equalities,redund...
github
EnricoGiordano1992/LMI-Matlab-master
mpt_parbb.m
.m
LMI-Matlab-master/yalmip/modules/parametric/mpt_parbb.m
5,172
utf_8
9ed244f3afde3125092cc9cd08a5feb0
function model = mpt_parbb(Matrices,options) % For simple development, the code is currently implemented in high-level % YALMIP and MPT code. Hence, a substantial part of the computation time is % stupid over-head. [Matrices.lb,Matrices.ub] = mpt_detect_and_improve_bounds(Matrices,Matrices.lb,Matrices.ub,Matrices.bin...
github
EnricoGiordano1992/LMI-Matlab-master
mpt_appendmodel.m
.m
LMI-Matlab-master/yalmip/modules/parametric/mpt_appendmodel.m
9,545
utf_8
1d7ce75903476d3b64c70bdd45442498
function model = savemptmodel(model,Pfinal,Pn,Fi,Gi,details); if length(Fi)>0 if length(model) == 0 model{1} = fakemptmodel(Pfinal, Pn, Fi, Gi, details.Ai, details.Bi, details.Ci); [H,K] = double(Pfinal); model{1}.epicost = []; model{1}.convex = 1; else anyqp = nnz([deta...
github
EnricoGiordano1992/LMI-Matlab-master
dualize.m
.m
LMI-Matlab-master/yalmip/extras/dualize.m
24,839
utf_8
95f053810de0314bbbbff10c9d8c9125
function [Fdual,objdual,X,t,err,complexInfo] = dualize(F,obj,auto,extlp,extend,options) % DUALIZE Create the dual of an SDP given in primal form % % [Fd,objd,X,t,err] = dualize(F,obj,auto) % % Input % F : Primal constraint in form AX=b+dt, X>0, t free. % obj : Primal cost CX+ct % auto : If set to 0, YALMIP will ...
github
EnricoGiordano1992/LMI-Matlab-master
polyprint.m
.m
LMI-Matlab-master/yalmip/extras/polyprint.m
2,602
utf_8
98455d0a41ce36cf7c72c346fa924f64
function symb_pvec = polyprint(pvec) %POLYPRINT Pretty print polynomial expression % % POLYPRINT is obsolete. Use SDISPLAY instead. for pi = 1:size(pvec,1) for pj = 1:size(pvec,2) p = pvec(pi,pj); if isa(p,'double') symb_p = num2str(p); else LinearVariables ...
github
EnricoGiordano1992/LMI-Matlab-master
sdd.m
.m
LMI-Matlab-master/yalmip/extras/sdd.m
478
utf_8
1e88bdde340f1e917f70ca6ea28f36f3
function Constraint = sdd(X) if issymmetric(X) Constraint = []; n = size(X,1); M = 0; for ii = 1:n for jj = [1:1:ii-1 ii+1:1:n] Mij = sdpvar(2); Constraint = Constraint + sdp2socp(Mij); M = M + sparse([ii jj ii jj],[ii ii jj jj],Mij(:),n,n); end end...
github
EnricoGiordano1992/LMI-Matlab-master
variable_replace.m
.m
LMI-Matlab-master/yalmip/extras/variable_replace.m
2,976
utf_8
24789bb29ef27f6c6f2e20d6ea39217f
function Z = variable_replace(X,Y,W) % Check so that Y is a simple unit variable Ybase = getbase(Y); Yvariables = getvariablesSORTED(Y); Xbase = getbase(X); Xvariables = getvariables(X); [i,j,k] = find(Ybase); if ~isequal(sort(i),1:length(i)) end if ~isequal(sort(j),2:(length(i)+1)) end if ~all(k == 1) end [mt,variab...
github
EnricoGiordano1992/LMI-Matlab-master
separable.m
.m
LMI-Matlab-master/yalmip/extras/separable.m
1,525
utf_8
10bbf0c3ce778c85f88b4dde2c05da0b
function exponent_m = separable(exponent_m,exponent_p,options); %SEPARABLE Internal function, not used % %exponent_m(sum((exponent_m>0),2)>2,:)=[]; % % card = max(sum((exponent_p>0),2)); % % n_less = exponent_m(sum((exponent_m>0),2)<card,:); % n_equ = exponent_m(sum((exponent_m>0),2)==card,:); % n_larg = exponent_...
github
EnricoGiordano1992/LMI-Matlab-master
convert_polynomial_to_sdpfun.m
.m
LMI-Matlab-master/yalmip/extras/convert_polynomial_to_sdpfun.m
5,293
utf_8
1282b1c3b7f96c19912ea8bbbc911873
function [model,changed] = convert_polynomial_to_sdpfun(model) % Assume we don't do anything changed = 0; found_and_converted = []; if any(model.variabletype > 2) % Bugger... changed = 1; % Find a higher order term sigmonials = find(model.variabletype == 3); model = update_monomial_bounds(model)...
github
EnricoGiordano1992/LMI-Matlab-master
apply_recursive_evaluation.m
.m
LMI-Matlab-master/yalmip/extras/apply_recursive_evaluation.m
3,378
utf_8
a9d54e9a0c8d81d0b492136a014b6007
function xevaled = apply_recursive_evaluation(p,xevaled) xevaled = xevaled(:)'; for i = 1:length(p.evaluation_scheme) switch p.evaluation_scheme{i}.group case 'eval' xevaled = process_evals(p,xevaled,p.evaluation_scheme{i}.variables); case 'monom' xevaled = process_monomials...
github
EnricoGiordano1992/LMI-Matlab-master
sdpt3struct2sdpt3block.m
.m
LMI-Matlab-master/yalmip/extras/sdpt3struct2sdpt3block.m
1,867
utf_8
dc8d29d2e8699f12a49253ce3dc1c69d
function [C,A,b,blk] = sdpt3struct2sdpt3block(F_struc,c,K) %SDPT3STRUCT2SDPT3BLOCK Internal function to convert data to SDPT3 format nvars = size(F_struc,2)-1; block = 1; top = 1; block = 1; blksz = 100; if K.l>0 blk{block,1} = 'l'; blk{block,2} = K.l; C{block,1} = sparse(F_struc(top:top+K.l-1,1)); for var_index...
github
EnricoGiordano1992/LMI-Matlab-master
coefficients.m
.m
LMI-Matlab-master/yalmip/extras/coefficients.m
6,992
utf_8
071772bad3d379ac9c6bdfa2a59483c8
function [base,v] = coefficients(p,x,vin) %COEFFICIENTS Extract coefficients and monomials from polynomials % % [c,v] = COEFFICIENTS(p,x) extracts the coefficents % of a scalar polynomial p(x) = c'*v(x) % % c = COEFFICIENTS(p,x) extracts the all coefficents % of a matrix polynomial. % % INPUT % p : SDPVAR...
github
EnricoGiordano1992/LMI-Matlab-master
shadowjacobian.m
.m
LMI-Matlab-master/yalmip/extras/shadowjacobian.m
2,364
utf_8
f46a1b7f9bb3d8e236fea4f759ca7036
function dfdx = shadowjacobian(f,x) % See SDPVAR/jacobian if isa(f,'double') dfdx = zeros(size(f,1),length(x)); return end if ~isempty(intersect(deepdepends(f),depends(x))) % Under development end if nargin==1 if isa(f,'sdpvar') x = recover(depends(f)); else x = 0; end ...
github
EnricoGiordano1992/LMI-Matlab-master
convert_sigmonial_to_sdpfun.m
.m
LMI-Matlab-master/yalmip/extras/convert_sigmonial_to_sdpfun.m
9,191
utf_8
56fb4a0deca7cfa0652142e2078fbb28
function [model,changed] = convert_sigmonial_to_sdpfun(model) % Always add this dummy struct model.high_monom_model = []; % Assume we don't do anything changed = 0; found_and_converted = []; if any(model.variabletype > 3) % Bugger... changed = 1; % Find a higher order term sigmonials = find(model.va...
github
EnricoGiordano1992/LMI-Matlab-master
expandmodel.m
.m
LMI-Matlab-master/yalmip/extras/expandmodel.m
14,898
utf_8
d969c77d2766c9985e6935c762569593
function [F,failure,cause,ALREADY_MODELLED] = expandmodel(F,h,options,w) % FIX : Current code experimental, complex, conservative, has issues with % nonlinearities and is slow... % % If it wasn't for polynomials and sigmonials, it would be trivial, but the % code is extremely messy since we want to have this functiona...
github
EnricoGiordano1992/LMI-Matlab-master
loadsedumidata.m
.m
LMI-Matlab-master/yalmip/extras/loadsedumidata.m
2,549
utf_8
bd6523935b1fd7c5c70b5bf8db27e0a7
function [F,h] = loadsedumidata(varargin) %LOADSEDUMIDATA Loads a problem definition in the SeDuMi format % % [F,h] = loadsedumidata('filename') Loads the problem min(h(x)), F(x)>0 from file 'filename' % [F,h] = loadsedumidata An "Open" - box will be opened filename = varargin{1}; % Does the file ...
github
EnricoGiordano1992/LMI-Matlab-master
convert_polynomial_to_quadratic.m
.m
LMI-Matlab-master/yalmip/extras/convert_polynomial_to_quadratic.m
6,093
utf_8
e42036044ee1903d0c693160c460a838
function [model,changed] = convert_polynomial_to_quadratic(model) % Assume we don't do anything changed = 0; % Are there really any non-quadratic terms? already_done = 0; while any(model.variabletype > 2) % Bugger... changed = 1; % Find a higher order term polynomials = find(model.variabletype >= 3);...
github
EnricoGiordano1992/LMI-Matlab-master
convert_perspective_log.m
.m
LMI-Matlab-master/yalmip/extras/convert_perspective_log.m
4,688
utf_8
d0b63460b38dcdea37d6dcb4721c262c
function p = convert_perspective_log(p) p.kept = 1:length(p.c); if isempty(p.evalMap) return end if ~any(p.variabletype == 4) return end variableIndex = []; for i=1:length(p.evalMap) variableIndex = [variableIndex p.evalMap{i}.variableIndex]; end removable = []; for i = 1:length(p.evalMap) if strcmp...
github
EnricoGiordano1992/LMI-Matlab-master
yalmiptable.m
.m
LMI-Matlab-master/yalmip/extras/yalmiptable.m
1,761
utf_8
9d3d69d9a7db32cbea823623e730f309
function yalmiptable(superheader,header,data,formats) %TABLE Internal function to display tables [nheadersy,nheadersx] = size(header); [ndatay,ndatax] = size(data); datasizes = zeros(ndatay,ndatax); for i = 1:ndatay for j = 1:ndatax if isa(data{i,j},'double') data{i,j} = num2str(data{i,j}); ...
github
EnricoGiordano1992/LMI-Matlab-master
sdisplay2.m
.m
LMI-Matlab-master/yalmip/extras/sdisplay2.m
7,460
utf_8
1580149b36a2d9dad048527aa6633013
function symb_pvec = sdisplay2(p,names) % TODO: sdpvar a b % x = (a+b)^0.3 -- writes "mpower_internal" % % TODO: sdpvar h x k % sdisplay2(h*x - k) -- misses the minus in front of "k" if nargin < 2 LinearVariables = 1:yalmip('nvars'); x = recover(LinearVariables); names = cell(length(x...
github
EnricoGiordano1992/LMI-Matlab-master
dissect.m
.m
LMI-Matlab-master/yalmip/extras/dissect.m
2,898
utf_8
287c87ea98e36a7d4b0f42fb58700649
function varargout = dissect(X); % DISSECT Dissect SDP constraint % % G = unblkdiag(F) Converts SDP to several smaller SDPs with more variables % % See also UNBLKDIAG if isa(X,'constraint') X = lmi(X); end switch class(X) case 'sdpvar' % Get sparsity pattern Z=spy(X); % Partition as ...
github
EnricoGiordano1992/LMI-Matlab-master
fmincon_con.m
.m
LMI-Matlab-master/yalmip/extras/fmincon_con.m
3,980
utf_8
bb638cd9a153556cf293b5b1615934b5
function [g,geq,dg,dgeq,xevaled] = fmincon_con(x,model,xevaled) global latest_xevaled global latest_x_xevaled % Early bail for linear problems g = []; geq = []; dg = []; dgeq = []; if model.linearconstraints xevaled = []; return end if nargin<3 if isequal(x,latest_x_xevaled) xevaled = latest_xeval...
github
EnricoGiordano1992/LMI-Matlab-master
sedumi2sdpt3.m
.m
LMI-Matlab-master/yalmip/extras/sedumi2sdpt3.m
4,093
utf_8
8f142cc073201468ac59c3aab8d61e4b
%SEDUMI2SDPT3 Internal function, obsolete %%******************************************************************* %% Converts from SeDuMi format. %% %% [blk,A,C,b] = sedumi2sdpt3(c,A,b,K) %% %% Input: fname.mat = name of the file containing SDP data in %% SeDuMi format. %% %% Important note: Sedum...
github
EnricoGiordano1992/LMI-Matlab-master
compress_evaluation_scheme.m
.m
LMI-Matlab-master/yalmip/extras/compress_evaluation_scheme.m
2,228
utf_8
ccf30e513f35e6ac7a6dc02416d6fae8
function model = compress_evaluation_scheme(model); scalars = {'erf','exp','log','sin','cos','log2','log10','slog','power_internal2','inverse_internal2','sqrtm_internal'}; for i = 1:length(model.evaluation_scheme) if strcmp(model.evaluation_scheme{i}.group,'eval') clear fun for k = 1:length(scalars)...
github
EnricoGiordano1992/LMI-Matlab-master
sdpvar2str.m
.m
LMI-Matlab-master/yalmip/extras/sdpvar2str.m
2,503
utf_8
dcd7bff7503ead1c19e49a6497f6e84b
function symb_pvec = sdpvar2str(pvec) %SDPVAR2STR Converts an SDPVAR object to MATLAB string representation % % S = SDPVAR2STR(P) % % S : String % P : SDPVAR object for pi = 1:size(pvec,1) for pj = 1:size(pvec,2) p = pvec(pi,pj); if isa(p,'double') symb_p = num2str(p); ...
github
EnricoGiordano1992/LMI-Matlab-master
compileinterfacedata.m
.m
LMI-Matlab-master/yalmip/extras/compileinterfacedata.m
50,239
utf_8
430b4ae42ad938e379c3ece8cde7b5bb
function [interfacedata,recoverdata,solver,diagnostic,F,Fremoved,ForiginalQuadratics] = compileinterfacedata(F,aux_obsolete,logdetStruct,h,options,findallsolvers,parametric) persistent CACHED_SOLVERS persistent allsolvers persistent EXISTTIME persistent NCHECKS %% Initilize default empty outputs diagnostic = []; inte...
github
EnricoGiordano1992/LMI-Matlab-master
selectsolver.m
.m
LMI-Matlab-master/yalmip/extras/selectsolver.m
23,046
utf_8
1cf76f327e2fcc2f98d45d6024ced027
function [solver,problem,forced_choice] = selectsolver(options,ProblemClass,solvers,socp_are_really_qc,allsolvers); %SELECTSOLVER Internal function to select solver based on problem category problem = 0; % UNDOCUMENTED force_solver = yalmip('solver'); if length(force_solver)>0 options.solver = force_solver; end ...
github
EnricoGiordano1992/LMI-Matlab-master
build_recursive_scheme.m
.m
LMI-Matlab-master/yalmip/extras/build_recursive_scheme.m
4,784
utf_8
3552dcf000e115ccb8eebfa81ab0dc22
function model = build_recursive_scheme(model); model.evaluation_scheme = []; model.deppattern = model.monomtable | model.monomtable; % Figure out arguments in all polynomials & sigmonials. This info is % used on several places, so we might just as well save it model.monomials = find(model.variabletype); model.monomi...
github
EnricoGiordano1992/LMI-Matlab-master
dual2cell.m
.m
LMI-Matlab-master/yalmip/extras/dual2cell.m
546
utf_8
18deb951cf9dacb4b2e3d2faf4166ccd
function X = dual2cell(dual_vec,K) %DUAL2CELL Internal function for organizing dual data row = 1; X.f = dual_vec(row:row+K.f-1); row = row + K.f; X.l = dual_vec(row:row+K.l-1); row = row + K.l; for k = 1:length(K.q) X.q{k} = dual_vec(row:row+K.q(k)-1); row = row + K.q(k); end for k = 1:length(K.r) X.r...
github
EnricoGiordano1992/LMI-Matlab-master
amplexpr.m
.m
LMI-Matlab-master/yalmip/extras/amplexpr.m
2,162
utf_8
0a47dd2e95c44a17fd78af99ed8950d6
function symb_pvec = amplexpr(pvec) %AMPLEXPR Converts SDPVAR variable to AMPL string for pi = 1:size(pvec,1) for pj = 1:size(pvec,2) p = pvec(pi,pj); if isa(p,'double') symb_p = num2str(p); else LinearVariables = depends(p); x = recover(LinearVariables)...
github
EnricoGiordano1992/LMI-Matlab-master
saveampl.m
.m
LMI-Matlab-master/yalmip/extras/saveampl.m
7,486
utf_8
0b44bf1f619d5b35fc97f2c1e9b865f5
function solution = saveampl(varargin) %SAVEAMPL Saves a problem definition in AMPL format % % SAVEAMPL(F,h,'filename') Saves the problem min(h(x)), F(x)>0 to the file filename % SAVEAMPL(F,h) A "Save As"- box will be opened % % YALMIP is currently able to save problems with linear and non-linear...
github
EnricoGiordano1992/LMI-Matlab-master
monolist.m
.m
LMI-Matlab-master/yalmip/extras/monolist.m
7,193
utf_8
dfe7495e41d589eb47d0d0df0acc3890
function new_x = monolist(x,dmax,dmin) % MONOLIST Generate monomials % % y = MONOLIST(x,dmax,dmin) % % Returns the monomials [1 x(1) x(1)^2 ... x(1)^dmax(1) x(2) x(1)x(2) etc...] % % >>sdpvar x y z % >>sdisplay(monolist([x y z],4)) % % Input % x : Vector with SDPVAR variables % dmax : Integers > 0 % % ...
github
EnricoGiordano1992/LMI-Matlab-master
eliminatevariables.m
.m
LMI-Matlab-master/yalmip/extras/eliminatevariables.m
11,708
utf_8
cb8bbf991713a6188ea388790a03a949
function [model,keptvariables,infeasible] = eliminatevariables(model,varindex,value) keptvariables = 1:length(model.c); rmvmonoms = model.rmvmonoms; newmonomtable = model.newmonomtable; % Assign evaluation-based values if length(model.evalParameters > 0) alls = union(varindex,model.evalParameters); [dummy,lo...
github
EnricoGiordano1992/LMI-Matlab-master
savecplexlp.m
.m
LMI-Matlab-master/yalmip/extras/savecplexlp.m
3,862
utf_8
d62ee5da3ba7f3c01ad267cdafef9bf6
function filename = savecplexlp(varargin) %SAVCPLEXLP Saves a problem definition in CPLEX-LP format % % SAVCPLEXLP(F,h,'filename') Saves the problem min(h(x)), F(x)>0 to the file filename % SAVCPLEXLP(F,h) A "Save As"- box will be opened % F = varargin{1}; h = varargin{2}; [aux1,aux2,aux3,model...
github
EnricoGiordano1992/LMI-Matlab-master
solvesdp_multiple.m
.m
LMI-Matlab-master/yalmip/extras/solvesdp_multiple.m
5,574
utf_8
c5412bd27722e2bcb8fe758c99a95fb7
function diagnostic = solvesdp_multiple(varargin); yalmiptime = clock; h = varargin{2}; varargin{2} = sum(recover(depends(h))); if ~is(h,'linear') error('Parts of your matrix objective is not linear (multiple solutions can currently only be obtained for linear objectives)'); end if is(h,'complex') error('Par...
github
EnricoGiordano1992/LMI-Matlab-master
computedimacs.m
.m
LMI-Matlab-master/yalmip/extras/computedimacs.m
2,052
utf_8
87d06eb1f6270fd74593f205c3343f1d
function dimacs = computedimacs(b,c,A,xin,y,s,K); % COMPUTEDIMACS % % min <C,X> s.t AX = b, X > 0 % max b'y s.t S-C+A'y =0, S > 0 % If no primal exist, fake till later if isempty(xin) x = c*0; else x = xin; end if isempty(s) s = c-A'*y; end xres = inf; sres = inf; % Not officially defined in DIMAC...
github
EnricoGiordano1992/LMI-Matlab-master
binmodel.m
.m
LMI-Matlab-master/yalmip/extras/binmodel.m
9,313
utf_8
0128e2f618a9bc78ea94707dd7fa1499
function varargout = binmodel(varargin) %BINMODEL Converts nonlinear mixed binary expression to linear model % % Applied to individual terms p defined on domain D % [plinear1,..,plinearN,Cuts] = BINMODEL(p1,...,pN,D) % % Alternative on complete set of constraint % F = BINMODEL(F) % % binmodel is used to convert nonl...
github
EnricoGiordano1992/LMI-Matlab-master
derivedualBoundsParameterFree.m
.m
LMI-Matlab-master/yalmip/extras/derivedualBoundsParameterFree.m
2,514
utf_8
56f518715fc81d312aae626a72ea92bb
function [dualUpper,L,U] = derivedualBoundsParameterFree(H,c,A,b,E,f,ops,parametricDomain) if isempty(A) dualUpper = []; L = []; U = []; return end n = length(c); m = length(b); me = length(f); x = sdpvar(n,1); Lambda = sdpvar(m,1); mu = sdpvar(me,1); % Homogenization alpha = sdpvar(1); F = []; % ...
github
EnricoGiordano1992/LMI-Matlab-master
derandomize.m
.m
LMI-Matlab-master/yalmip/extras/derandomize.m
3,645
utf_8
14a3a6bc4823e6b81182566b82f8e393
function Fderandomized = derandomize(F) chanceDeclarations = find(is(F,'chance')); randomDeclarations = find(is(F,'random')); if isempty(randomDeclarations) error('Cannot derandomize, cannot find declaration of random variables'); end keep = ones(length(F),1); keep(randomDeclarations)=0; keep(chanceDeclarations)=...
github
EnricoGiordano1992/LMI-Matlab-master
sdisplay.m
.m
LMI-Matlab-master/yalmip/extras/sdisplay.m
10,497
utf_8
f90455026b9451c20d71013181d0348a
function symb_pvec = sdisplay(pvec,symbolicname) %SDISPLAY Symbolic display of SDPVAR expression % % Note that the symbolic display only work if all % involved variables are explicitely defined as % scalar variables. % % Variables that not are defined as scalars % will be given the name ryv(i). ryv means % recovered YA...
github
EnricoGiordano1992/LMI-Matlab-master
yalmip.m
.m
LMI-Matlab-master/yalmip/extras/yalmip.m
55,094
utf_8
5973f49d728e3b655ac45234688eea26
function varargout = yalmip(varargin) %YALMIP Returns various information about YALMIP % % YALMIP can be used to check version numbers and % find the SDPVAR and SET objects available in workspace % % EXAMPLES % V = YALMIP('version') % Returns version % YALMIP('nvars') % Returns total number o...
github
EnricoGiordano1992/LMI-Matlab-master
gams2yalmip.m
.m
LMI-Matlab-master/yalmip/extras/gams2yalmip.m
13,976
utf_8
4e1639693ca899bd14a7436ffb74839c
function varargout = gams2yalmip(fileName,filenameOut); % GAMS2YALMIP Converts GAMS model to YALMIP % % [F,h] = GAMS2YALMIP(gamsfile,yalmipfile) converts the GAMS model in % the file 'gamsfile' to a YALMIP mpodel % % Input % GAMSFILE : Char with filename for GAMS model % YALMIPFILE : Char with filenam...
github
EnricoGiordano1992/LMI-Matlab-master
sdpsettings.m
.m
LMI-Matlab-master/yalmip/extras/sdpsettings.m
30,773
utf_8
f22c426933af16967501a65e37de3fd2
function options = sdpsettings(varargin) %SDPSETTINGS Create/alter solver options structure. % % OPTIONS = SDPSETTINGS with no input arguments returns % setting structure with default values % % OPTIONS = SDPSETTINGS('NAME1',VALUE1,'NAME2',VALUE2,...) creates a % solution options structure OPTIONS in which the ...
github
EnricoGiordano1992/LMI-Matlab-master
findulb.m
.m
LMI-Matlab-master/yalmip/extras/findulb.m
1,661
utf_8
01608ade93f5720dd1ed28fbb581df02
function [lb,ub,cand_rows_eq,cand_rows_lp] = findulb(F_struc,K,lb,ub) %FINDULB Internal function to extract upper and lower variable bounds n = size(F_struc,2)-1; if nargin < 3 lb = -inf*ones(n,1); ub = inf*ones(n,1); end cand_rows_eq = []; cand_rows_lp = []; ub2 = ub; lb2 = lb; if (K.f ~=0) A = -F_struc(1...
github
EnricoGiordano1992/LMI-Matlab-master
optimizer.m
.m
LMI-Matlab-master/yalmip/extras/@optimizer/optimizer.m
13,039
utf_8
6c454ee18c6c1138dc70087dd5296087
function sys = optimizer(Constraints,Objective,options,x,u) %OPTIMIZER Container for optimization problem % % OPT = OPTIMIZER(Constraints,Objective,options,x,u) exports an object that % contains precompiled numerical data to be solved for varying arguments % x, returning the optimal value of the expression u. % ...
github
EnricoGiordano1992/LMI-Matlab-master
or.m
.m
LMI-Matlab-master/yalmip/extras/@constraint/or.m
2,653
utf_8
27825fd7ad2b8d86ce557d3e68f65448
function varargout = or(varargin) %OR (overloaded) % Prune empty clauses varargin = {varargin{find(~cellfun('isempty',varargin))}}; % Models OR using a nonlinear operator definition switch class(varargin{1}) case 'char' z = varargin{2}; X = varargin{3}; Y = varargin{4}; ...
github
EnricoGiordano1992/LMI-Matlab-master
groupchanceconstraints.m
.m
LMI-Matlab-master/yalmip/extras/@lmi/groupchanceconstraints.m
710
utf_8
11836c904991112de5ae44d3a433fe11
function S = groupchanceconstraints(F) G = {}; S = {}; F = flatten(F); for i = 1:length(F.clauses) if ~isempty(F.clauses{i}.confidencelevel) G = addgroup(G,F.clauses{i}.jointprobabilistic); end end for i = 1:length(G) S{i} = []; end for i = 1:length(F.clauses) for j = 1:length(G) if ise...
github
EnricoGiordano1992/LMI-Matlab-master
display.m
.m
LMI-Matlab-master/yalmip/extras/@lmi/display.m
4,251
utf_8
faa1a9761a6adc79bf84740db5d5d064
function sys = display(X) %display Displays a SET object. X = flatten(X); nlmi = length(X.LMIid); if (nlmi == 0) disp('empty SET') return end lmiinfo{1} = 'Matrix inequality'; lmiinfo{2} = 'Element-wise inequality'; lmiinfo{3} = 'Equality constraint'; lmiinfo{4} = 'Second order cone constraint'; lm...
github
EnricoGiordano1992/LMI-Matlab-master
plot.m
.m
LMI-Matlab-master/yalmip/extras/@lmi/plot.m
10,083
utf_8
090afe5b9fc145b26c6455b0a5dadfef
function varargout = plot(varargin) %PLOT Plots the feasible region of a set of constraints % % p = plot(C,x,c,n,options) % % Note that only convex sets are allowed, or union of convex sets % represented using binary variables (either defined explictly or % introduced by YALMIP when modelling, e.g., mixed integer line...
github
EnricoGiordano1992/LMI-Matlab-master
check.m
.m
LMI-Matlab-master/yalmip/extras/@lmi/check.m
7,498
utf_8
f38af4ea7112e1679d548c202f244cd4
function [pres,dres] = check(F) % CHECK(F) Displays/calculates constraint residuals on constraint F % % [pres,dres] = check(F) % % pres : Primal constraint residuals % dres : Dual constraint residuals % % If no output argument is supplied, tabulated results are displayed % % Primal constraint residuals are calculated ...
github
EnricoGiordano1992/LMI-Matlab-master
kkt.m
.m
LMI-Matlab-master/yalmip/extras/@lmi/kkt.m
7,518
utf_8
fb7d8e6e638dcea5721ade8b986ddf2e
function [KKTConstraints, details] = kkt(F,h,parametricVariables,ops); %KKT Create KKT system % % [KKTConstraints, details] = kkt(Constraints,Objective,parameters,options) if ~isempty(F) if any(is(F,'sos2')) error('SOS2 structures not allowed in KKT'); end end [aux1,aux2,aux3,model] = export(F,h,sdpse...
github
EnricoGiordano1992/LMI-Matlab-master
getvariables.m
.m
LMI-Matlab-master/yalmip/extras/@lmi/getvariables.m
905
utf_8
ef689619cd74e765cfe444b697d69eb0
function used = getvariables(F) F = flatten(F); if length(F.clauses) == 0 used = []; return end if isa(F.clauses{1},'cell') F = flatten(F); end used = recursivegetvariables(F,1,length(F.clauses)); function used = recursivegetvariables(F,startindex,endindex) if endindex-startindex>50 newstart = star...
github
EnricoGiordano1992/LMI-Matlab-master
depends.m
.m
LMI-Matlab-master/yalmip/extras/@lmi/depends.m
826
utf_8
9d357105527d2957bed1f995761d9b8f
function LinearVariables = depends(F) F = flatten(F); % Get all used variables in this LMI object used = recursivedepends(F.clauses); % Now, determine the involved linear variables [mt,variabletype] = yalmip('monomtable'); if any(variabletype)%1%~isempty(nlv) & any(ismembc(used,nlv(1,:))) LinearVariables = find(...
github
EnricoGiordano1992/LMI-Matlab-master
polytope.m
.m
LMI-Matlab-master/yalmip/extras/@lmi/polytope.m
2,367
utf_8
936949134726945ac12d1cf313b998c3
function [P,x] = polytope(X,options) % polytope Converts constraints to polytope object % % P = polytope(F) % [P,x] = polytope(F) % % P : polytope object (Requires the Multi-parametric Toolbox) % x : sdpvar object defining the variables in the polytope P.H*x<=P.K % F : Constraint object with linear inequal...
github
EnricoGiordano1992/LMI-Matlab-master
pwamodel.m
.m
LMI-Matlab-master/yalmip/extras/@lmi/pwamodel.m
1,084
utf_8
b0d6a88e6f4c02018d6c85b072b057de
function [A,b] = pwamodel(F,x) [dummy,aux,s,model] = export(F,[]); A = -model.F_struc(:,2:end); b = model.F_struc(:,1); keep_these = find(ismember(aux.used_variables,getvariables(x))); A = [A(:,keep_these) A(:,setdiff(1:size(A,2),keep_these))]; [A,b] = fourier_motzkin(A,b,length(keep_these)); function [A,b] = four...
github
EnricoGiordano1992/LMI-Matlab-master
categorizeproblem.m
.m
LMI-Matlab-master/yalmip/extras/@lmi/categorizeproblem.m
19,268
utf_8
62d7b9118d98a76df49c59aabb69bc3a
function [problem,integer_variables,binary_variables,parametric_variables,uncertain_variables,semicont_variables,quad_info] = categorizeproblem(F,P,h,relax,parametric,evaluation,F_vars,exponential_cone) %categorizeproblem Internal function: tries to determine the type of optimization problem F = flatten(F); C...
github
EnricoGiordano1992/LMI-Matlab-master
Polyhedron.m
.m
LMI-Matlab-master/yalmip/extras/@lmi/Polyhedron.m
2,402
utf_8
30f5cf13a964070f9b800e10d49a372f
function [P,x] = polyhedron(X,options) % polyhedron Converts constraint to MPT polyhedron object % % P = polyhedron(F) % [P,x] = polyhedron(F) % % P : polyhedron object (Requires the Multi-parametric Toolbox) % x : sdpvar object defining the variables in the polyhedron % F : Constraint object with linear i...
github
EnricoGiordano1992/LMI-Matlab-master
lmi2sedumistruct.m
.m
LMI-Matlab-master/yalmip/extras/@lmi/lmi2sedumistruct.m
20,660
utf_8
29d3ff75fe3b58db06487e773878882b
function [F_struc,K,KCut,schur_funs,schur_data,schur_variables] = lmi2sedumistruct(F) %lmi2sedumistruct Internal function: Converts LMI to format needed in SeDuMi nvars = yalmip('nvars'); %Needed lot'sa times... % We first browse to see what we have got and the % dimension of F_struc (massive speed improvement) F =...
github
EnricoGiordano1992/LMI-Matlab-master
plot.m
.m
LMI-Matlab-master/yalmip/extras/@ncvar/plot.m
3,229
utf_8
dfbeaac5398f6b4128ffe8d0b28117f3
function Y=plot(varargin) %PLOT (overloaded) % Fast version for plotting simple PWA objects if nargin == 1 X = varargin{1}; if isa(varargin{1},'sdpvar') if length(X) == 1 if isequal(full(getbase(X)),[0 1]) extstruct = yalmip('extstruct',getvariables(X)); if ~...
github
EnricoGiordano1992/LMI-Matlab-master
subsasgn.m
.m
LMI-Matlab-master/yalmip/extras/@ncvar/subsasgn.m
7,395
utf_8
0dc57809e264cdd2678ba09ef96ecf94
function y = subsasgn(X,I,Y) %SUBASGN (overloaded) try if strcmp('()',I.type) X_is_spdvar = isa(X,'sdpvar'); Y_is_spdvar = isa(Y,'sdpvar'); if any(I.subs{1} <=0) error('Index into matrix is negative or zero.'); end switch 2*X_is_spdvar+Y_is_spdvar cas...
github
EnricoGiordano1992/LMI-Matlab-master
sym.m
.m
LMI-Matlab-master/yalmip/extras/@ncvar/sym.m
3,154
utf_8
07ae0f26ffe548a4af2b632bd01c0bdf
function symb_pvec = sdisplay(pvec,symbolicname) %SDISPLAY Symbolic display of SDPVAR expression % % Note that the symbolic display only work if all % involved variables are explicitely defined as % scalar variables. % % Variables that not are defined as scalars % will be given the name ryv(i). ryv means % recovered YA...
github
EnricoGiordano1992/LMI-Matlab-master
or.m
.m
LMI-Matlab-master/yalmip/extras/@ncvar/or.m
2,236
utf_8
68a1641f6a288ec6b04d2e6630a99bd9
function varargout = or(varargin) %OR (overloaded) % % z = or(x,y) % z = x | y % % The OR operator is implemented using the concept of nonlinear operators % in YALMIP. X|Y defines a new so called derived variable that can be % treated as any other variable in YALMIP. When SOLVESDP is issued, % constraints are ...
github
EnricoGiordano1992/LMI-Matlab-master
repmat.m
.m
LMI-Matlab-master/yalmip/extras/@ncvar/repmat.m
2,094
utf_8
695991712637a5274ff19d51a5fa40d2
function Y=repmat(varargin) %REPMAT (overloaded) try X = varargin{1}; Y = X; Y.basis = []; n = Y.dim(1); m = Y.dim(2); for i = 1:length(Y.lmi_variables)+1 temp = repmatfixed(reshape(X.basis(:,i),n,m),varargin{2:end}); Y.basis(:,i) = temp(:); end Y.dim(1) = size(temp,1); Y.dim(2) = size(temp,2...
github
EnricoGiordano1992/LMI-Matlab-master
subsref.m
.m
LMI-Matlab-master/yalmip/extras/@ncvar/subsref.m
4,658
utf_8
844eb9433dfa4b2c8de950579397cde2
function varargout = subsref(varargin) %SUBSREF (overloaded) % Stupid first slice call (supported by MATLAB) if length(varargin{2}.subs) > 2 i = 3; ok = 1; while ok & (i <= length(varargin{2}.subs)) ok = ok & (isequal(varargin{2}.subs{i},1) | isequal(varargin{2}.subs{i},':')); i = i + 1; ...
github
EnricoGiordano1992/LMI-Matlab-master
pwa.m
.m
LMI-Matlab-master/yalmip/extras/@ncvar/pwa.m
4,373
utf_8
22c949c81c11c00407c9edb6dab6066e
function [p,Bi,Ci,Pn,Pfinal] = PWA(h,Xdomain) % PWA Tries to create a PWA description % % [p,Bi,Ci,Pn,Pfinal] = PWA(h,X) % % Input % h : scalar SDPVAR object % X : Constraint object % % Output % % p : scalar SDPVAR object representing the PWA function % Bi,Ci,Pn,Pfinal : Data in MPT format % % The command tries ...
github
EnricoGiordano1992/LMI-Matlab-master
mtimes.m
.m
LMI-Matlab-master/yalmip/extras/@ncvar/mtimes.m
5,659
utf_8
70cfba01103b6fc708e8b37cbf17df2e
function Z = mtimes(X,Y) %MTIMES (overloaded) % Brute-force implementation of multiplication of noncommuting variables % (with possible commuting variables involved) % Check classes X_is_spdvar = isa(X,'sdpvar'); Y_is_spdvar = isa(Y,'sdpvar'); X_is_ncvar = isa(X,'ncvar'); Y_is_ncvar = isa(Y,'ncvar'); % Get all the ...
github
EnricoGiordano1992/LMI-Matlab-master
and.m
.m
LMI-Matlab-master/yalmip/extras/@ncvar/and.m
2,197
utf_8
e574e35b982582324eb3c78d9d965cab
function varargout = and(varargin) %AND (overloaded) % % z = and(x,y) % z = x & y % % The AND operator is implemented using the concept of nonlinear operators % in YALMIP. X|Y defines a new so called derived variable that can be % treated as any other variable in YALMIP. When SOLVESDP is issued, % constraints ...
github
EnricoGiordano1992/LMI-Matlab-master
addfactors.m
.m
LMI-Matlab-master/yalmip/@sdpvar/addfactors.m
2,579
utf_8
1a0e68ae8acfbe591015380fb18a28ad
function Z = addfactors(Z,X,Y) if isa(X,'double') || isa(X,'logical') if length(Y.midfactors)==0 return end % Y = refactor(Y); Z.midfactors = Y.midfactors; Z.leftfactors = Y.leftfactors; Z.rightfactors = Y.rightfactors; Z.midfactors{end+1} = X; if length(X)>1 Z.leftfact...
github
EnricoGiordano1992/LMI-Matlab-master
asec.m
.m
LMI-Matlab-master/yalmip/@sdpvar/asec.m
881
utf_8
210ec08cb20380016ffc9ab743ade4e9
function varargout = asec(varargin) %ASEC (overloaded) switch class(varargin{1}) case 'sdpvar' varargout{1} = InstantiateElementWise(mfilename,varargin{:}); case 'char' operator = struct('convexity','none','monotonicity','none','definiteness','none','model','callback'); operator.conv...
github
EnricoGiordano1992/LMI-Matlab-master
norm.m
.m
LMI-Matlab-master/yalmip/@sdpvar/norm.m
12,678
utf_8
833cfcffac8a86284f26c75e3bec8bc9
function varargout = norm(varargin) %NORM (overloaded) % % t = NORM(x,P) % % The variable t can only be used in convexity preserving % operations such as t<=1, max(t,y)<=1, minimize t etc. % % For matrices... % NORM(X) models the largest singular value of X, max(svd(X)). % NORM(X,2) is the same a...
github
EnricoGiordano1992/LMI-Matlab-master
pow10.m
.m
LMI-Matlab-master/yalmip/@sdpvar/pow10.m
979
utf_8
3c67d739166aa630ae6b9939611ab49c
function varargout = pow10(varargin) %POW10 (overloaded) switch class(varargin{1}) case 'double' error('Overloaded SDPVAR/POW10 CALLED WITH DOUBLE. Report error') case 'sdpvar' varargout{1} = InstantiateElementWise(mfilename,varargin{:}); case 'char' operator = struct('convexity...
github
EnricoGiordano1992/LMI-Matlab-master
tan.m
.m
LMI-Matlab-master/yalmip/@sdpvar/tan.m
841
utf_8
af58a56ca9dea8449e2c6fef9202be16
function varargout = tan (varargin) %TAN (overloaded) switch class(varargin{1}) case 'double' error('Overloaded SDPVAR/TAN CALLED WITH DOUBLE. Report error') case 'sdpvar' varargout{1} = InstantiateElementWise(mfilename,varargin{:}); case 'char' operator = struct('convexity','no...
github
EnricoGiordano1992/LMI-Matlab-master
asinh.m
.m
LMI-Matlab-master/yalmip/@sdpvar/asinh.m
677
utf_8
e3f8453d9133b82d52664494918be4c5
function varargout = asinh(varargin) %ASINH (overloaded) switch class(varargin{1}) case 'sdpvar' varargout{1} = InstantiateElementWise(mfilename,varargin{:}); case 'char' operator = struct('convexity','none','monotonicity','increasing','definiteness','none','model','callback'); opera...
github
EnricoGiordano1992/LMI-Matlab-master
plot.m
.m
LMI-Matlab-master/yalmip/@sdpvar/plot.m
4,864
utf_8
0e3843abf5f44e3a2a5e011a093f9bc3
function Y=plot(varargin) %PLOT (overloaded) % Fast version for plotting simple PWA objects if nargin == 1 X = varargin{1}; if isa(varargin{1},'sdpvar') if length(X) == 1 if isequal(full(getbase(X)),[zeros(length(X),1) eye(length(X))]) extstruct = yalmip('extstruct',getvaria...
github
EnricoGiordano1992/LMI-Matlab-master
ismember_internal.m
.m
LMI-Matlab-master/yalmip/@sdpvar/ismember_internal.m
3,293
utf_8
5c70c86d0d39f66f8b69c3e2f83b0508
function YESNO = ismember_internal(x,p) %ISMEMBER_INTERNAL Helper for ISMEMBER if isa(x,'sdpvar') & (isa(p,'polytope') | isa(p,'Polyhedron')) if length(p) == 1 [H,K,Ae,be] = poly2data(p); if min(size(x))>1 error('first argument should be a vector'); end if length(x) == ...
github
EnricoGiordano1992/LMI-Matlab-master
sqrtm_internal.m
.m
LMI-Matlab-master/yalmip/@sdpvar/sqrtm_internal.m
1,323
utf_8
b33f0b07880e3a33d7952c5da2aaf17b
function varargout = sqrtm_internal(varargin) %SQRTM (overloaded) switch class(varargin{1}) case 'double' varargout{1} = sqrt(varargin{1}); case 'sdpvar' varargout{1} = InstantiateElementWise(mfilename,varargin{:}); case 'char' X = varargin{3}; F = (X >= eps); ...
github
EnricoGiordano1992/LMI-Matlab-master
invsathub.m
.m
LMI-Matlab-master/yalmip/@sdpvar/invsathub.m
3,871
utf_8
36f5bf3e2525f27b871df12fa5223c98
function varargout = invsathub (varargin) %INVSATHUB (overloaded) switch class(varargin{1}) case 'sdpvar' varargout{1} = InstantiateElementWise(mfilename,varargin{:}); case 'char' operator = struct('convexity','none','monotonicity','none','definiteness','positive','model','callback'); ...
github
EnricoGiordano1992/LMI-Matlab-master
tanh.m
.m
LMI-Matlab-master/yalmip/@sdpvar/tanh.m
783
utf_8
30538db981e451f6b520b7c7895a8e3d
function varargout = tanh(varargin) %TANH (overloaded) switch class(varargin{1}) case 'double' error('Overloaded SDPVAR/TANH CALLED WITH DOUBLE. Report error') case 'sdpvar' varargout{1} = InstantiateElementWise(mfilename,varargin{:}); case 'char' operator = struct('convexity','...
github
EnricoGiordano1992/LMI-Matlab-master
acot.m
.m
LMI-Matlab-master/yalmip/@sdpvar/acot.m
807
utf_8
8bec7762540393b0aae6b6b9ebc2864a
function varargout = acot(varargin) %ACOT (overloaded) switch class(varargin{1}) case 'double' error('Overloaded SDPVAR/ACOT CALLED WITH DOUBLE. Report error') case 'sdpvar' varargout{1} = InstantiateElementWise(mfilename,varargin{:}); case 'char' operator = struct('convexity','...
github
EnricoGiordano1992/LMI-Matlab-master
subsasgn.m
.m
LMI-Matlab-master/yalmip/@sdpvar/subsasgn.m
10,156
utf_8
0a2475237bd1aeaaf6ae5439d0435c39
function y = subsasgn(X,I,Y) %SUBASGN (overloaded) try if strcmp('()',I.type) X_is_spdvar = isa(X,'sdpvar') | isa(X,'ndsdpvar'); Y_is_spdvar = isa(Y,'sdpvar') | isa(Y,'ndsdpvar'); if islogical(I.subs{1}) I.subs{1} = double(find(I.subs{1})); end if any(I.subs{1}...
github
EnricoGiordano1992/LMI-Matlab-master
atan.m
.m
LMI-Matlab-master/yalmip/@sdpvar/atan.m
1,152
utf_8
071999f9ece4ebf3e24f7eb58e385149
function varargout = atan(varargin) %ATAN (overloaded) switch class(varargin{1}) case 'sdpvar' varargout{1} = InstantiateElementWise(mfilename,varargin{:}); case 'char' operator = struct('convexity','none','monotonicity','increasing','definiteness','none','model','callback'); operato...
github
EnricoGiordano1992/LMI-Matlab-master
sqrt.m
.m
LMI-Matlab-master/yalmip/@sdpvar/sqrt.m
3,036
utf_8
dbdc41fb98e355d38f7827f44c1095b5
function varargout = sqrt(varargin) %SQRT (overloaded) % % t = sqrt(x) % % The variable t can only be used in concavity preserving % operations such as t>=1, max t etc. % % When SQRT is used in a problem, the domain constraint % (x>=0) is automatically added to the problem. % % In nonconvex cases, use sqrtm instead. % ...
github
EnricoGiordano1992/LMI-Matlab-master
exp.m
.m
LMI-Matlab-master/yalmip/@sdpvar/exp.m
1,481
utf_8
955d4798dee16d92e6cae7aa58a9527a
function varargout = exp(varargin) %EXP (overloaded) switch class(varargin{1}) case 'sdpvar' x = varargin{1}; d = size(x); x = x(:); y = []; for i = 1:prod(d) xi = extsubsref(x,i); if isreal(xi) y = [y;InstantiateElementWise(mfilename...
github
EnricoGiordano1992/LMI-Matlab-master
times.m
.m
LMI-Matlab-master/yalmip/@sdpvar/times.m
11,578
utf_8
446a9d604ec704ba3af6d3c341e133f8
function y = times(X,Y) %TIMES (overloaded) % Check dimensions [n,m]=size(X); if ~((prod(size(X))==1) || (prod(size(Y))==1)) if ~((n==size(Y,1) && (m ==size(Y,2)))) error('Matrix dimensions must agree.') end end; % Convert block objects if isa(X,'blkvar') X = sdpvar(X); end if isa(Y,'blkvar') ...
github
EnricoGiordano1992/LMI-Matlab-master
erf.m
.m
LMI-Matlab-master/yalmip/@sdpvar/erf.m
2,291
utf_8
34e3cf2135d769bd1d33bc39a72655bd
function varargout = erf(varargin) %ERF (overloaded) switch class(varargin{1}) case 'double' error('Overloaded SDPVAR/ERF CALLED WITH DOUBLE. Report error') case 'sdpvar' varargout{1} = InstantiateElementWise(mfilename,varargin{:}); case 'char' operator = struct('convexity','non...
github
EnricoGiordano1992/LMI-Matlab-master
erfc.m
.m
LMI-Matlab-master/yalmip/@sdpvar/erfc.m
756
utf_8
d1523f1dce8b03ea7377827749ac68ef
function varargout = erfc(varargin) %ERFC (overloaded) switch class(varargin{1}) case 'double' error('Overloaded SDPVAR/ERFC CALLED WITH DOUBLE. Report error') case 'sdpvar' varargout{1} = InstantiateElementWise(mfilename,varargin{:}); case 'char' operator = struct('convexity','...
github
EnricoGiordano1992/LMI-Matlab-master
power.m
.m
LMI-Matlab-master/yalmip/@sdpvar/power.m
3,973
utf_8
840a5282a2173feba3ea38f581a42286
function y = power(x,d) %POWER (overloaded) % Vectorize x if d is vector if numel(x)==1 & (numel(d)>1) x = x.*ones(size(d)); end % Vectorize if x is a vector if numel(d)==1 & (numel(x)>1) d = d.*ones(size(x)); end if ~isequal(size(d),size(x)) error('Dimension mismatch in power'); end if isa(x,'sdpvar') ...
github
EnricoGiordano1992/LMI-Matlab-master
asin.m
.m
LMI-Matlab-master/yalmip/@sdpvar/asin.m
733
utf_8
3100afdb50eaff864a0e7f6331e7452b
function varargout = asin(varargin) %ASIN (overloaded) switch class(varargin{1}) case 'sdpvar' varargout{1} = InstantiateElementWise(mfilename,varargin{:}); case 'char' operator = struct('convexity','none','monotonicity','increasing','definiteness','none','model','callback'); operato...
github
EnricoGiordano1992/LMI-Matlab-master
lmior.m
.m
LMI-Matlab-master/yalmip/@sdpvar/lmior.m
1,467
utf_8
cc3cd29a91a762b089e33a55547aac55
function varargout = lmior(varargin) %OR (overloaded) % Models OR using a nonlinear operator definition switch class(varargin{1}) case 'char' z = varargin{2}; allextvars = yalmip('extvariables'); X = {}; for i = 3:nargin Xtemp = expandor(varargin{i},allextvars); ...
github
EnricoGiordano1992/LMI-Matlab-master
ismember.m
.m
LMI-Matlab-master/yalmip/@sdpvar/ismember.m
3,414
utf_8
fb8583f41aa5b455ee06f14d295c8b5f
function varargout = ismember(varargin) %ISMEMBER Define membership constraint on SDPVAR object % % F = ISMEMBER(x,P) % % Input % x : SDPVAR object % P : MPT polytope object, double, or CONSTRAINT object % Output % F : Constraints % % Depending on the second argument P, different classes of constraint are % generat...
github
EnricoGiordano1992/LMI-Matlab-master
lmixor.m
.m
LMI-Matlab-master/yalmip/@sdpvar/lmixor.m
1,474
utf_8
08dbdab504839a1207e532b611ea5c1f
function varargout = lmixor(varargin) %XOR (overloaded) % Models XOR using a nonlinear operator definition switch class(varargin{1}) case 'char' z = varargin{2}; allextvars = yalmip('extvariables'); X = {}; for i = 3:nargin Xtemp = expandxor(varargin{i},allextvars); ...
github
EnricoGiordano1992/LMI-Matlab-master
model.m
.m
LMI-Matlab-master/yalmip/@sdpvar/model.m
4,132
utf_8
875ed9e5691dfe8921448baee0c20edf
function [properties,F,arguments,fcn]=model(X,method,options,extstruct,w) %MODEL Internal function to extracts nonlinear operator models % % [properties,F] = model(x) % % MODEL returns the constraints needed to model a variable related to an % extended operator such as min, max, abs, norm, geomean, ... % % Examples : ...
github
EnricoGiordano1992/LMI-Matlab-master
log.m
.m
LMI-Matlab-master/yalmip/@sdpvar/log.m
2,585
utf_8
39c91997bea9e861421411a1caa9ff54
function varargout = log(varargin) %LOG (overloaded) switch class(varargin{1}) case 'double' error('Overloaded SDPVAR/LOG CALLED WITH DOUBLE. Report error') case 'sdpvar' % Try to detect logsumexp construction etc varargout{1} = check_for_special_cases(varargin{:}); % Nope, t...
github
EnricoGiordano1992/LMI-Matlab-master
subsref.m
.m
LMI-Matlab-master/yalmip/@sdpvar/subsref.m
9,032
utf_8
2f2b19b258a84e0cc39f6afdf6d64c31
function varargout = subsref(varargin) %SUBSREF (overloaded) % Stupid first slice call (supported by MATLAB) % x = sdpvar(2);x(1,:,:) Y = varargin{2}; if length(Y)==1 if length(Y.subs) > 2 && isequal(Y.type,'()') i = 3; ok = 1; while ok && (i <= length(Y.subs)) ok = ok && (iseq...
github
EnricoGiordano1992/LMI-Matlab-master
sinh.m
.m
LMI-Matlab-master/yalmip/@sdpvar/sinh.m
738
utf_8
167ff99de55c2333af9b1e2479b71a75
function varargout = sinh(varargin) %SINH (overloaded) switch class(varargin{1}) case 'double' error('Overloaded SDPVAR/ACOT CALLED WITH DOUBLE. Report error') case 'sdpvar' varargout{1} = InstantiateElementWise(mfilename,varargin{:}); case 'char' operator = struct('convexity','...
github
EnricoGiordano1992/LMI-Matlab-master
pwa.m
.m
LMI-Matlab-master/yalmip/@sdpvar/pwa.m
4,366
utf_8
47c565d662055a330df89467ca9366bd
function [p,Bi,Ci,Pn,Pfinal] = PWA(h,Xdomain) % PWA Tries to create a PWA description % % [p,Bi,Ci,Pn,Pfinal] = PWA(h,X) % % Input % h : scalar SDPVAR object % X : SET object % % Output % % p : scalar SDPVAR object representing the PWA function % Bi,Ci,Pn,Pfinal : Data in MPT format % % The command tries to expa...
github
EnricoGiordano1992/LMI-Matlab-master
max.m
.m
LMI-Matlab-master/yalmip/@sdpvar/max.m
4,345
utf_8
513e8918b0e1fb1684e2ddcd491cbeb8
function y = max(varargin) %MAX (overloaded) % % t = max(X) % t = max(X,Y) % t = max(X,[],DIM) % % Creates an internal structure relating the variable t with convex % operator max(X). % % The variable t is primarily meant to be used in convexity preserving % operations such as t<=..., minimize t etc. % % If the variabl...
github
EnricoGiordano1992/LMI-Matlab-master
deadhub.m
.m
LMI-Matlab-master/yalmip/@sdpvar/deadhub.m
1,425
utf_8
19c2ad46cb40a73e2e3512d91f306a52
function varargout = deadhub(varargin) switch class(varargin{1}) case 'double' error('Overloaded SDPVAR/SIN CALLED WITH DOUBLE. Report error') case 'sdpvar' varargout{1} = InstantiateElementWise(mfilename,varargin{:}); case 'char' operator = struct('convexity','convex','monotoni...