Question: I need it in MATLAB please. d ) Create a function encrypt that accepts the assembled string as input, and returns the encrypted string and

I need it in MATLAB please.
d) Create a function encrypt that accepts the assembled string as input, and returns the
encrypted string and the key as outputs. The encryption algorithm is as follows:
Generate a random integer between 1 and 25(randi[1,25]). This is the key.
For the sample text that follows below, assume that key =10
If the location (index number) of a character in the string is an odd number, shift the
ASCII code value of the character by an amount equal to the key +1. If the index
number is even, shift its ASCII code value by key -1.
outargl =?kmkCkm:=km:Dkm; ?km;CkLWO] SNNXbS'V [NOXaN]] SNXXzW,1>
e
I need it in MATLAB please. d ) Create a function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!