Hi,
As you are new to MATLAB, please refer to the following links that will provide you an overview of writing scripts in MATLAB:
For the part of baconian cipher, please refer to the implementation of caesar cipher and substitution (not providing you link for baconian cipher as it will be a learning part for you to implement) cipher to understand the things that would be included in the script for writing encoder and decoder for a cipher.
Hope this helps!