Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is for a MATLAB class. please check your script runs before submitting . 4. The function rot(s, n) is a simple Caesar cipher encryption

this is for a MATLAB class. please check your script runs before submitting .

image text in transcribed

image text in transcribed

4. The function rot(s, n) is a simple Caesar cipher encryption algorithm that replaces each English letter in places forward or backward along the alphabet in the strings. For example, the result of rot ("Baz!",3) is 'Edcl'. An encrypted string can be deciphered by simply performing the inverse rotation on it, that is, rot ("Edc! ,3), which rotates each English letter in the strings three places to the left . Numbers, symbols, and non-letters are not transformed. Implement the following function: function rotatedText=rot(text,n) To assist you as you solve this problem, you could write several functions as local functions in the rot.m file: isUppercaseLetter(letter), getUppercaseLetter(n), getLowercaseLetter(n), and get Position(letter). You may also wish to use the built-in functions isletter (...), find (...), and mod (...)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions