Lab 6 - CE93 - Engineering Data Analysis Joan Walker,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CE93 - Engineering Data Analysis Joan Walker, Spring 2011 Lab 6 02/23/2011 1. Generate uniformly distributed random number on the interval (0,1) with rand() a. Generate a vector of 10000 random numbers. b. Plot the CDF c. Find i. The mean of the numbers generated in a). ii. The mean of the square of the numbers generated in a). iii. The variance of the numbers generated in a) using the MATLAB variance function. Show that this equals the result of (ii) minus the square of the result of (i). 2. Recall the pipe leak location problem discussed in class, in which the probability density function increases linearly from the left end of the pipe to the right end of the pipe and is twice as high on the right end as the left end. Recall that the PDF and CDF are: a. Solve the CDF formula for . In other words, suppose ± ² ³ ´ µ ¶ , what must x be? Write the formula for x as a function of p , i.e. x(p) . b. You can now use the random numbers from 1a) to generate random values of the leak
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.
Ask a homework question - tutors are online