Generate same random permutations (reshape) for sequence?

8 visualizaciones (últimos 30 días)
Barbossa H
Barbossa H el 17 de Dic. de 2018
Editada: madhan ravi el 18 de Dic. de 2018
I amlooking for a way genrate random permutation function for X and Y.
Example:
X = randi ([0 1], 10,1);
Y = bsc(A, 0.05);
If I reshape the data
reshape([X;Y],1,[]);
0 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 1 0 1 0
but here I want X Y reshape row wise
like
0 0
0 1 ....etc
Someone could help me.

Respuestas (1)

madhan ravi
madhan ravi el 17 de Dic. de 2018
a=[0 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 1 0 1 0];
reshape(a,2,[])'
  4 comentarios
Barbossa H
Barbossa H el 18 de Dic. de 2018
Yes, Thank you. I got it
madhan ravi
madhan ravi el 18 de Dic. de 2018
Editada: madhan ravi el 18 de Dic. de 2018
Thank you Jan , @Barbossa if you got the answer to your question make sure to accept the answer so that people know the question is solved.

Iniciar sesión para comentar.

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by