Encrypting a Message with secret code?

조회 수: 1 (최근 30일)
Tyler Silva
Tyler Silva 2015년 10월 26일
답변: TastyPastry 2015년 10월 26일
I need help encrypting a message with code. Instructions are in the document attached. Heres the code I have so far:
s ='MATLAB'
val=double(s)
nume=reshape(val, 3, 5)
m = [1 5 3; 2 11 8; 4 24 21]
%inv(m)
nume=nume-32
ncoded=mod(m*(nume),95)+32
scoded=reshape(char(ncoded),1,15)
%sdecoded = reshape(double(scoded),3,5)
%ndecoded = mod (inv(m)*(sdecoded-32), 95) + 32
%sdecoded = reshape (char(ndecoded), 1, 15)

채택된 답변

TastyPastry
TastyPastry 2015년 10월 26일
There are tons of Caesar Cipher resources out there since it's a pretty basic problem in computer science courses.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Encryption / Cryptography에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by