% strToMorse(str) : string to Morse Code
function res = strToMorse(str)
bcspace = 4; % code for space between characters
res = []; %! Initialize the accumulator
for k=1:length(str)
   c = str(k); % The character being processed
   m = charToMorse(c); % Convert to Morse
   res = [res, bcspace, m]; %! Append to the accumulator 
end
