FYI: The fastest solution mentioned at the problem description uses a lookup-table. Don't beat yourself too much.
Hello, William. I like very much the originality & especially the efficiency of your approach here. Am I correct in thinking that the existing code would struggle to correctly decode a message that was encoded from (say) "Beware of the Sasquatch Man's involvement in Operation Phoenix"? [I don't want to explain this, to avoid giving too many clues to others. But I hope you get my point.] Although I am confident you could tweak your code (if necessary) to handle such cases. —DIV
Indexed Probability Table
Set the array elements whose value is 13 to 0
Predicting life and death of a memory-less light bulb
Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
Find the nearest prime number
Curve fitting (linear functions) & function handles
Anyone for tennis? Your chances of winning a (standard) game
Is input the global variable z?
The twelve days of Christmas
Add all the numbers between two limits (inclusive)
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office