Question

Problem 6) Use Matlab to perform the followings experiments: a) Use command randi to randomly generate 25 integer numbers between 50 and 100 b) Use commands histogram to plot and command histcounts to count the number of numbers generated in part (a) in bins of length 10. That is plot and count the total number of numbers generated between 50 and 60, 60 and 70, and so on. c) Use the combination of commands rand and round to redo part (a) above. d) Redo part (b) for part (c) above.
0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Problem 6) Use Matlab to perform the followings experiments: a) Use command randi to randomly generate...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • matlab Problem 6: The Matlab command 'randn(m,n) produces an m x n matrix of random numbers...

    matlab Problem 6: The Matlab command 'randn(m,n) produces an m x n matrix of random numbers that are a realization of a white random process with some probability density function. Moreover, the Matlab command 'rand(m,n)' produces an mxn matrix of random numbers between 0 and 1 that are a realization of a white random process with some probability density function. a) Use Matlab to do the following steps: 1) Let u-randn (10000,1); and plot u. 2) Use the command 'mean(u)'...

  • Write a MATLAB code to generate an array of 100 random integers between 1 and 10...

    Write a MATLAB code to generate an array of 100 random integers between 1 and 10 using the command “randi”. Using “if” statement, impose the condition that if a number in the array is greater than 5, the number is modified as, number = number – 11. Find the sum of the array and store it. Repeat this exercise for 10, 1000 and 100000 trials and plot the following: (a) Sums obtained vs trails number (b) Histogram of the sum...

  • 5000) of uniformly distributed random numbers between 1 Generate a large number (1000 or and 2...

    5000) of uniformly distributed random numbers between 1 Generate a large number (1000 or and 2 (HINT: use the rand command for generating a uniformly distributed random variable between 0 and 1 and then move it!). b Plot the pdf of the distribution. Use the hist command to obtain the number of samples in a random numbers, define binx as a vector with bins on the x-axis (binx = 1:0.01:2). P histx,binx) will provide you the weights pdf. Compare with...

  • Exercise 1: Use Matlab command to obtain the following a) Extract the fourth row of the...

    Exercise 1: Use Matlab command to obtain the following a) Extract the fourth row of the matrix generated by magic(6) b) Show the results of 'x' multiply by 'y' and 'y' divides by 'x'. Given x = [0:0.1:1.1] and y=[10:21] c) Generate random matrix 'r' of size 4 by 5 with number varying between -8 and 9 Exercise 2: Use MATLAB commands to get exactly as the figure shown below x=pi/2:pi/10:2*pi; y=sin(x); z=cos (x);

  • solve with only matlab, please. :) random 15.8 Ifr is a normal random number with mean...

    solve with only matlab, please. :) random 15.8 Ifr is a normal random number with mean 0 and variance 1 (as generated by randn), it can be transformed into a random number X with mean u and standard deviation a by the relation X=ar + In an experiment, a Geiger counter is used to count the radioactive emissions of cobalt 60 over a 10-second period. After a large number of such readings are taken, the count rate is estimated to...

  • The problem demonstrates the use of the random number generator to recover previously generated random numbers Write a function called randi test that takes two scalar positive integer arguments maxi...

    The problem demonstrates the use of the random number generator to recover previously generated random numbers Write a function called randi test that takes two scalar positive integer arguments maxi and n, and retums two output arguments: a row vector of n2 elements and and n-by-n matrix. The two output arguments must contain the exact same set of random integers that fall between 1 and maxi Do this using the random number genertor, not by reshaping the data Example n,v-randi...

  • Develop a program to read the result from that spreadsheet then perform the following tasks both...

    Develop a program to read the result from that spreadsheet then perform the following tasks both in LabVIEW and in MATLAB. i. Both programs can display the histograms with the default number of bins. Are these default numbers the same? The maximum, minimum marks and standard deviation should be displayed. ii. Compare the histograms generated by both programs. Are the results displayed in these programs similar? iii. Instead of using the default bin, you should assign a number of bins...

  • 2. Generate a large number of Gaussian distributed random numbers with mean 0 and variance 1....

    2. Generate a large number of Gaussian distributed random numbers with mean 0 and variance 1. (HINT: use the randn command) a) Provide a scatter plot of the random numbers b) Plot the pdf of the distribution (similar to 1) and compare with theoretical pdf given in the class handout. c) If I want to generate a Gaussian distributed random numbers with mean 2 and variance 9 from the previously generated set of random numbers, how would I do it?...

  • Problem 3 In this problem you add some random noise to the sine function and then...

    Problem 3 In this problem you add some random noise to the sine function and then calculate the derivative. • First, generate a vector (the same length as x, above) which consists of random numbers in the range (-0.02) to (0.02). Use the MATLAB function rand. rand will return a random number between 0 and 1. For this problem, you actually need random numbers between +/- 0.02. How will you convert the random numbers you obtain from rand to be...

  • We will be using Matlab as the software tool for this lab project. 1.Explore and become...

    We will be using Matlab as the software tool for this lab project. 1.Explore and become familiar with the random number generators in Matlab such as “rand”, “randn”, and “randi” (in fact all software tools can only generate pseudo-random numbers). Notice that to randomize the generators the use of “rng” function is encouraged as the previous techniques are discouraged. 2. “Random walk” is one of the primary and relative simple random processes in which the process starts from a neutral...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT