File Exchange Pick of the Week

Our best user submissions

ShakespeareInsult

Will‘s pick this week is ShakespeareInsult by Jos (10584).

Shall I compare thee to a summer’s day? Or perhaps something less flattering? What to do if the muses escape you and you can’t come up with that perfectly poetic insult? Well look no further than the ShakespeareInsult function.

Based on the Shakespeare Insult Kit, the function randomly chooses three words from three columns each containing 50 words. Precede a random combination with a “Thou,” and you have yourself some bard-inspired slander. I modified the code slightly to have it spit out 20 insults per call:


Insults


I don’t exactly know why, but I’m reminded of another function that ships with MATLAB… In any event, of the ones I generated, I think that gorbellied tickle-brained lout is my favorite. Brownie points if you can tell me the total number of possible insults given that there are 50 choices for each word. Bigger brownie points if you can tell me how many times I’d have to generate a random insult before I can say with 95% certainty that I’ve seen all of them. Or just sit back, relax, and let the insults fly.

Let us know what you think here or leave a comment for Jos (10584).

|
  • print

コメント

コメントを残すには、ここ をクリックして MathWorks アカウントにサインインするか新しい MathWorks アカウントを作成します。