% or gate with n inputs
% release date 2016.11.14
% Prof Frank Urban urban@fiu.edu


classdef OrGate
    properties
        in
        out
    end
    methods
        function obj = OrGate
        end
        function obj = applyInputs(obj,in)
            if islogical(in)
                obj.in = in;
                totInputs = size(in,2);
                obj.out = logical(0);
                for nInput = 1:totInputs
                    obj.out = obj.out | obj.in(nInput);
                end
            else
                fprintf(2,'\n ERROR: inputs must be logical - no changes made\n')
            end
        end
    end
end
