%% Decrypting a message
clear;
clc;

chars = 'acdgmrs';
volts = 1:7;

message = blanks(length(samples));
for iVolt = volts
   logCondition = samples > (iVolt - 0.5) & samples < (iVolt + 0.5);
   indices = find(logCondition);
   message(indices) = chars(iVolt);
end

disp(message)