How to split vector to seqences
Mostrar comentarios más antiguos
Hello, can u help me please? I want to split generated numbers to 3 sequences for 8 bits ,for example i used :
x = randi([0 1],24,1)
and now i want to split these 24 numbers to 3 sequences for 8 bits, I could not find the answer.
Respuestas (3)
ahmed nebli
el 3 de Dic. de 2018
Editada: ahmed nebli
el 3 de Dic. de 2018
0 votos
u can use something like that:
for i=1:8:24
var = x[i,1]; % here you need to do what store var in someplace else in order not to loose it
end
1 comentario
Milos Kopec
el 3 de Dic. de 2018
Fangjun Jiang
el 3 de Dic. de 2018
reshape(x,3,[])
reshape(x,[],3)
1 comentario
Milos Kopec
el 3 de Dic. de 2018
Milos Kopec
el 3 de Dic. de 2018
0 votos
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
