www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptimrunner/getNumLcon.m
function lencon = getNumLcon(obj) %GETNUMLCON Return the lengths of the linear constraints % % LENCON = GETNUMLCON(OBJ) returns the lengths of each of the linear % constraints in the optimization. LENCON is returned as a 1-by-NLCON % vector. % % See also GETNUMNONLCON, GETNUMOBJECTIVES, GETNUMCONSTRAINTS % Copyright 2006 The MathWorks, Inc. isl = cellfun(@isLinear, obj.Constraints.Items); if ~isempty(isl) lencon = obj.Constraints.OutputLengths(isl); else lencon = []; end