Thursday

April 24, 2014

April 24, 2014

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.

**Related Questions**

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

Decartes Rule of Signs - Could you explain to me decartes Rule of signs? Here ...

cartesian vectors 2 - let vector U = (vector u1, vector u2) vector V = (vector ...

science(physics) - vector a+ vector b= 2i Vector a+ vector b=4j Then the angle ...

jane - 1. a centripetal-acceleration addict rides in uniform circular motion ...

Physics - The three vectors have magnitude a =3m, b= 4m and c=10m . On the x ...

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

Computer Science (MATLAB) - Given an arbitrary one dimensional vector v imputed ...

Physics - Let vector A = 4i^ + 4j^, vector B = -2i^ - 5j^, and vector F = vector...

Physics - Let vector A = 4i^ + 4j^, vector B = -2i^ - 5j^, and vector F = vector...