Code covered by the BSD License  

Highlights from
Adaptive Fault Masking With Incoherence Scoring

image thumbnail
from Adaptive Fault Masking With Incoherence Scoring by Baykant ALAGOZ
Matlab simulation environment for testing various voting algorithms

[sonuc]=MajorityVoting(y1,y2,y3,y4,y5)
function [sonuc]=MajorityVoting(y1,y2,y3,y4,y5)
% Bit wise mojority voting.
% y1,y2,y3,y4,y5: bits

input=[y1;y2;y3;y4;y5];
[m n]=size(input);
top=0;
for i=1:m
   top=top+input(i);
end
if top > m/2
    sonuc=1;
else
    sonuc=0;
end

Contact us at files@mathworks.com