⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cone.m

📁 matlab波形优化算法经常要用到的matlab toolbox工具箱:yalmip
💻 M
字号:
function y = cone(Axplusb,cxplusd)
%CONE Defines a second order cone constraint ||z||<x
%
% Input
%    z       : column vector SDPVAR object.
%    h       : scalar double or SDPVAR object
%
% Example
%    F = set(cone(z,x)) 
%
% An alternative syntax with only one argument is also possible
%    F = set(cone(z))
% This command is equivalent to set(cone(z(2:end),z(1))
% 

%
% See also  SET, RCONE, @SDPVAR/NORM

% Author Johan L鰂berg
% $Id: cone.m,v 1.6 2008/02/12 08:23:01 joloef Exp $

[n,m] = size(Axplusb);
if min(n,m)>1
    error('z must be a  vector')
end

if nargin == 2
    if prod(size(cxplusd))>1
        error('x must be a scalar')
    end
else
end

if n<m
    Axplusb = Axplusb';
end

try
    if nargin == 2
        y = [cxplusd;Axplusb];
    else
        y = [Axplusb];
    end
  %  if is(y,'linear')
        y.typeflag = 4;
  %  else
  %      y = (Axplusb'*Axplusb < cxplusd*cxplusd);
  %  end
  y = set(y);
catch
    error(lasterr)
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -