How to split a column matrix into N parts
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
tyler seudath
el 5 de Nov. de 2021
Respondida: Dave B
el 5 de Nov. de 2021
Hi Everyone,
I have a column matrix with dimensions 100000 x 1 and I want to split that column into 100 columns each containing 1000 of the datapoints. Is there a way to go about doing that?
Thank you,
Tyler Seudath
0 comentarios
Respuesta aceptada
Dave B
el 5 de Nov. de 2021
reshape is a great way to do this:
x=rand(100000,1);
y=reshape(x,1000,100);
y1=reshape(x,1000,[]); % Because the 100 is determined, you can let MATLAB calculate it
y2=reshape(x,[],100); % Because the 1000 is determined, you can let MATLAB calculate it
x(1:10)
x(1001:1010)
y(1:10,1:2)
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!