Question: 1. create Matlab function randword that receives an integer size as input and outputs a random word of length size (defined as a vector of

1. create Matlab function randword that receives an integer size as input and outputs a random word of length size (defined as a vector of characters) on the usual alphabet.

To this aim, your function will compute a random vector with components in {1, . . . , 26} and then replace each component with the corresponding letter in the alphabet.

2.create another Matlab function Iamrandom that receives two integers size, iterations and a word name (array of characters) as inputs and that generates iterations times a random word of length size

3. Use the function Iamrandom to check how many times your name appears in a random word of length 10000 out of 100 attempts. Write the result under the form:

Today I was random . . . times, where the . . . is replaced with the number of successes in the 100 experiments.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!