📄 true.m
字号:
function x = true(x)
% TRUE Constrains a variable to be positive
%
% TRUE(x) returns the constraint set(x>=1).
%
% For safety, it is advised to use the TRUE operator when working with
% logic constraints, instead of relying on the automatic constraints used
% by YALMIP (expression generated using AND and OR are automatically
% assumed to be constrained to be true.
%
% SET(a|b) is automatically changed to SET(TRUE(a|b)), or equivalently
% SET((a|b) >= 1), while SET(a) will be interpreted as SET(a>=0). To
% constrain a to be true, the user has to explicitely use SET(TRUE(a)).
%
% See also SDPVAR/FALSE, SDPVAR/AND, SDPVAR/OR, SDPVAR/NOT, BINVAR, BINARY
x = set(x>=1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -