Exp) 10
Exp) 10
m 1 of 2
for i = 1:n
ep = a(i, :); % Error pattern
[s, q1] = deconv(ep, Gp); % Compute syndrome for error pattern
s = mod(s, 2);
disp(['Error vector: ', num2str(a(i, :)), ' | Syndrome: ', num2str(s)]);
if isequal(s, syndrome) % If the syndrome matches, locate the error
num = i;
break; % Exit loop when error is found
end
end