How do I construct a vector from two different integers drawn with equal probability?

What is the most efficient way to construct a vector of length N from two different integers drawn with equal probability? For example, a vector of randomly drawn -1s and 1s.

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Preguntada:

el 11 de Mayo de 2016

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by