Sunday

February 1, 2015

February 1, 2015

Posted by **Jhon** on Tuesday, October 18, 2011 at 9:53am.

For example given the vector [0 1 0 0 0 1 0 0 0 1] and probability .2 provided by the user there is a 20% chance that the values in the vector will change (either from 0 to 1 or 1 to 0) or that there's a good chance that a vector of 10 values 2 values in that vector will change.

I'm asked to create a function to do this and kind of confused how to do this with the probability of changing the values (apparently I have to use rand function which I know how to use just kind of lost how to do this)

I assume that I would have to take each value within the vector (there will be exactly 8 values in the vector) and doing something to each of these values with the probability and changing them from the current value to the one it is not (either 1 or 0).

I'm kind of lost. Thanks for any help which you can provide.

**Answer this Question**

**Related Questions**

probability - out of 250 students interviewed at a community college, 90 were ...

calculus - Find a unit vector U such that the rate of change of f in the ...

Applied Maths - Given that position vector a=4i+2j, position vector b=13i+5j are...

physics - Vector A is given by A = c x + 6 y, and vector B is given by B = 4.8 x...

maths - Given that vector c and vector d are non zero vectors such that vector c...

maths - Let vector a and b be two non-null vectors such that |vector a +b| =|...

pre-ap Algebra 2 - write a polynomial function f of least degree that has the ...

Math - A large company has a private computer network connecting 300 different ...

Calculus - Use the given vector to find a vector b such that compab = 4. a = ‹4...

Multivariable Calculus - I was asked to state as a product of speed and unit ...