Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB. DO NOT USE LOOPS OR ANY CONDITIONALS LIKE IF STATEMENTS. Function Name: fruitEncryption Inputs: 1. (char) MxN array of uncapitalized characters Outputs: 1. (char)
MATLAB.
DO NOT USE LOOPS OR ANY CONDITIONALS LIKE IF STATEMENTS.
Function Name: fruitEncryption Inputs: 1. (char) MxN array of uncapitalized characters Outputs: 1. (char) updated MxN array of characters Background: You finally decoded the secret messages for APPLES, and you are about to send a message back, when you discover that the evil fruit spies have cracked your code! You have an urgent message to send, and you have to quickly figure out a new way to encrypt this message. To throw the spy off, you decide to incorporate arrays. Function Description Write a function that takes in a character array and encrypts it with the following steps: 1. Shift the characters in the even rows by the number of columns in the array 2. Shift the characters in the odd columns by the number of rows in the array, but backwards (towards 'a) Swap the top half of the array with the bottom half. 3. Note: Follow the order of shifting given above. The alphabet should 'wrap' around. When dividing the array in half, use floor() to account for the possibility that the array could have odd dimensions. Hint: The logic behind shifting character values in this problem is exactly the same as the shifting logic from coldwar()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started