Skip to content

Commit

Permalink
Implements yalmip#662
Browse files Browse the repository at this point in the history
  • Loading branch information
johanlofberg committed Oct 1, 2019
1 parent a55079b commit 67f106c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions @sdpvar/erfcinv.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
function varargout = erfcinv(varargin)
%ERFCINV (overloaded)

switch class(varargin{1})

case 'double'
error('Overloaded SDPVAR/ERFCINV CALLED WITH DOUBLE. Report error')

case 'sdpvar'
varargout{1} = InstantiateElementWise(mfilename,varargin{:});

case 'char'

operator = struct('convexity','none','monotonicity','decreasing','definiteness','none','model','callback');
operator.bounds = @bounds;

varargout{1} = [];
varargout{2} = operator;
varargout{3} = varargin{3};

otherwise
error('SDPVAR/ERFCINV called with CHAR argument?');
end

function [L,U] = bounds(xL,xU)
L = erfcinv(xU);
U = erfcinv(xL);

0 comments on commit 67f106c

Please sign in to comment.