MATLAB: Concatenation Problem

concatenationMATLAB

Hi,
I am trying to get cipher text for input text
S=Input Array
K=Output Array
Example- input text: 'hl' then I want cipher_text=ch
I am getting output as
Output
Q =
c
Q =
h
But i am not getting how to concatenate these values and get 'ch' as cipher text for input text 'hl'
Pls Provide your suggestions..
Code :- removed…

Best Answer

Instead of assinging to Q, assign to Q(j); and at the end, display Q instead of Q(j)