The test suite only seems to work if the n primes each have the same number of digits. For example, with n=3, a perfectly good answer would be [5,7,11], but this crashes the test suite. It could be fixed by using combine=strcat(combine,strtrim(b(i,:)));
@William: your suggestion has been incorporated into the test suite.
Thank you both for improving the quality of this problem. Cheers, Doddy.
Remove the vowels
Find the sum of the elements in the "second" diagonal
Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
Matlab Basics - Create a row vector
Difference of Closest Palindromes
Number Puzzle - 055
Number Puzzle - 070
Number Puzzle - 025
Number Puzzle - 101
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