Problem 1150. Polybius Square
Given a string, calculate the coordinates. Input will be always in lowercase. If string is a sentence then use 0 (zero) to indicate the space between words.
1 2 3 4 5 6
1 a b c d e f
2 g h i j k l
3 m n o p q r
4 s t u v w x
5 y z
input 'cody' returns [13 33 14 51] and
input 'i love matlab' returns [23 0 26 33 44 15 0 31 11 42 26 11 12].
For more information refer to. Please note that another colum (6th column) is added in order to seperate letter i and letter j. That means table in this question is different from reference page.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers42
Suggested Problems
-
Extract leading non-zero digit
2197 Solvers
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1931 Solvers
-
How many trades represent all the profit?
608 Solvers
-
Calculate the area of a triangle between three points
3317 Solvers
-
Basics: Divide integers to get integer outputs in all cases
135 Solvers
More from this Author92
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!