How to split a column matrix into N parts
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Dave B
2021-11-5
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!