-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathxnor.m
42 lines (37 loc) · 762 Bytes
/
xnor.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
42
function Z = xnor(Z1,Z2)
% xnor - computes the xnor of two zonotopes
%
% Syntax:
% Z = xnor(Z1,Z2)
%
% Inputs:
% Z1 - zonotope
% Z2 - zonotope,
%
% Outputs:
% Z - zonotope object enclosing the xnor zonotope
%
% Example:
%
% Other m-files required: none
% Subfunctions: none
% MAT-files required: none
%
% See also: none
% Author: Amr Alanwar
% Written: 16-October-2022
% Last update: 16-October-2022
%
%
% Last revision: ---
%------------- BEGIN CODE --------------
if ~isa(Z1,'logicalZonotope')
Z1=logicalZonotope.enclosePoints(Z1);
end
if ~isa(Z2,'logicalZonotope')
Z2=logicalZonotope.enclosePoints(Z2);
end
Z = not(xor(Z1,Z2));
%Z =unique(Z);
end
%------------- END OF CODE --------------