-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnot.m
41 lines (36 loc) · 757 Bytes
/
not.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function Z = not(Z1)
% and - overloads ~ operator, computes not of a logical zonotope
%
% Syntax:
% Z = not(Z1)
%
% Inputs:
% Z1 - zonotope
%
% Outputs:
% Z - zonotope object enclosing the and zonotope
%
% Example:
%
% Other m-files required: none
% Subfunctions: none
% MAT-files required: none
%
% See also: none
% Author: Amr Alanwar
% Written: 8-Sept-2022
% Last update:
%
%
% Last revision: ---
%------------- BEGIN CODE --------------
if (~isempty(Z1.c))
[rows,cols] = size(Z1.c);
Z = logicalZonotope(xor(ones(rows,1),Z1.c),Z1.G);
else
[rows,cols] = size(Z1.G{1});
Z = logicalZonotope(ones(rows,1),Z1.G);
end
%Z =unique(Z);
end
%------------- END OF CODE --------------