Cody

# Problem 1201. Simple Decoder Ring

The stereotypical decoder ring is remembered as a cereal box prize from the 1950s. Kids learned about cryptography by starting with the simple transposition cipher. There were many different rings made. One of the more common had two rings on a common center, each with the letters of the alphabet in order. You would rotate the inner ring relative to the outer to produce a shift of letters, so the cipher was to produce a positive or negative shift of the alphabet, giving a letter by letter code key.

Whether or not it really was in cereal boxes, your job is to produce a MATLAB function that codes a string using the letter shift required. You must keep the case of the output the same as the input.

` simpleDecoderRing('I am ready to try it - with punctuation and CAPS!',-3)`

is

` 'F xj obxav ql qov fq - tfqe mrkzqrxqflk xka ZXMP!'`

### Solution Stats

64.44% Correct | 35.56% Incorrect
Last solution submitted on May 09, 2016

### Solution Comments

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

### Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

### MATLAB Academy

New to MATLAB?

Learn MATLAB today!

#### Join the 15-year community celebration.

Play games and win prizes!

Learn more