Question: Iterations Until Integer Equals Five.vi Write a program that randomly gener - ates an integer in the range from 1 to 1 0 and iterates
Iterations Until Integer Equals Five.vi Write a program that randomly generates an integer in the range from to and iterates this random process until the integer equals The number of iterations required until the randomly generated integer equals is then displayed on the front panel in a Numeric Indicator, which is labeled Required Iterations as shown next.
To create a random integer in the range from to use Random Number
to generate a random floatingpoint number in the range from up to but not including multiply this number by and then use Round Toward Infinity to round the floatingpoint number to the next highest integer note Round Toward Infinity rounds x to x as shown here.
To check whether this integer equals use the Equal? icon. Finally, think
carefully about how to use the While Looprelated icons to determine the value of Required Iterations. Knowing that the integers are created randomly ie equal probability for
producing integers through each iteration what do you expect the value of Required Iterations to be on average? Run your VI times and record the value of Required Iterations resulting from each run. Is the average of these values close to the value that yoo
Modify the program to create an indicator on the front panel that displays the randomly generated integer value. Why is this # always
Create a ms delaa y in the program. Discuss why this changes the integer value display u expected?
Please include a block diagram as I have already created mine but it displays values over
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
