This is the string version of Problem 1035. Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a string like abbcccddddeeeee
So if n = 3, then return
And if n = 5, then return
Same as Problem 1035
It is what I have written in the summary of this problem. @+
I totally didn't think this would be accepted. Now I feel like a bad person. :P
I believe that TMW is going to rescore all CODY solutions using feval(@eval in the future : http://blogs.mathworks.com/community/2012/02/06/scoring-in-cody/#comment-13751
As Aurelien says, we've changed it so this will fail from now on. It may take a while to root out all the old answers though.
@Ned, it seems that the new trick to have a mini score now is to use str2func lol!
Yes, there is always one more trick. Hopefully we can keep the sickness from being an epidemic.
Renaming a field in a structure array
Who knows the last digit of pi?
Matrix indexing with two vectors of indices
Replicate elements in vectors
Create a vector whose elements depend on the previous element
Sort an array of structures
Assign numerical values to a structure with 1 field
Convert a numerical matrix into a cell array of strings
Fill a zeros matrix
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