Investigate a monte carlo type simulation for an ensemble

Assignment Help MATLAB Programming
Reference no: EM13860579

Assignment:

1. Complete the code for arbitrary, A, ωet, and N (i.e. the values of A, and N are entered ea the first 3 lines of the code).

2. Test when A = 1 and = 0 for N=10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000, and 100000. What does this say about N?

3. Rerun part 2 when ,ωet = .1, 1, 10 and 100. Are your results what you expect? Why or why not?

4. You can also nee this method to calculate the autocorrelation function, Rx(t1,t2). Let

Rx(t1,t2) = A cos2et1 + θ) cos(ωet2 +θ)

Modify your cede to calculate the autocorrelation. Test your modified code when A = 1, ωet1 = .1, and ωet2= .4 for N=10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000 and 100000. Compare your answer to the exact one, equation. Do they agree? Why or Why not?

The purpose of this assignment is to investigate a Monte Carlo type Simulation for an ensemble average.

We can perform a Mende Carlo simulation to calculate the ensemble average of a random process. Consider the Random Process as in Example

x(t) = A cos(ωet + θ)

where θ is a uniformly distributed random variable in the range (0, 2Π). To calculate the ensemble average x(t), we need to calculate a 1-dim array of uniformly distributed random variables θ, then calculate x(t) for each value and sum. If we generate enough variables, the sum will converge to the integral.

To generate a 1 dimensional array of uniformly distributed random num¬bum over the range (0,1) in Matlab use the rand(M,N) function which gen¬erates uniformly distributed random numbers.

For example, to generate 10000 uniformly distributed random numbers we can use

N=10000;
θ= rend(1,N) ;

To scale the random numbers from 0 to 2Π, just multiply by 2Π.

Then choose a value for ωet, then calculate the individual values of x(t) and sum (most likely using the same techniques as in the previous assignment) and divide by N.

Reference no: EM13860579

Questions Cloud

Describe a radix-sort method for lexicographically sorting : Describe a radix-sort method for lexicographically sorting a sequence S of triplets (k,l,m),where k, l,and m are integers in the range[0,N-1]
Perform sensitivity analysis by changing one parameter : Perform sensitivity analysis by changing one parameter at a time (leaving all other parameters fixed at the values used in Task 4) and answer the following questions.
What kind of technology did they have? : What did they do for entertainment or relaxation?
Question regarding the angular velocity : Explain why the angular velocity was constant over time at the second part of the experiment but it was not constant at the first part of the experiment. By the first part of the experiment, I mean the part which involved hanging masses.
Investigate a monte carlo type simulation for an ensemble : The purpose of this assignment is to investigate a Monte Carlo type Simulation for an ensemble average. We can perform a Mende Carlo simulation to calculate the ensemble average of a random process. Consider the Random Process as in Example
Describe the theory of determinism : Describe the theory of Determinism and list the main supporters of this theory.
Devastation of world war i and world war ii? : What are some specific examples of literature, art, and music in which artists responded strongly to the devastation of World War I and World War II?
Describe the weaknesses of the articles of confederation : Describe the weaknesses of the Articles of Confederation and discuss the reasons why Americans created a weak national government.
What roles did free blacks play in the civil war? : What roles did free Blacks play in the Civil War? How did the war affect each group?

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd