my code is given below but error is key length is not same as plain_text
% Matlab code to encipher and Decipher Vigenere Cipher
% input parameter
key = input('Enter the cipher key: ','s' );plain_text =input('ENter the text to be ciphered: ','s');length(plain_text)k=repmat((key),1,length(plain_text))%k1=k(:)'
%k=repelem(key,length(plain_text))
% Vigenere ciphere Encryption
plain_num=plain_text-97;k1=k-97;ciphered_num=rem(plain_num+k1,26);ciphered_text=char(ciphered_num+97)% Vigenere ciphere Decryption
ciphered_num=ciphered_text-97;deciphered_num=rem(ciphered_num-k1,26);deciphered_text=char(deciphered_num+97)
Best Answer