Transferring Data between Cell Arrays
显示 更早的评论
Hi,
Simple question, is there a more efficient method of transferring batches data from one cell array to another.
B{1:5,1:8} = A{6:11,1:8};
Operations like this don't work, but I am hoping to find a method similar to this that does not involve for-loops, which is what I am currently doing.
for i = 1:5
for j = 1:8
B{i,j} = A{5+i,j};
end
end
采纳的回答
更多回答(1 个)
Azzi Abdelmalek
2013-3-5
clear B
A=num2cell(rand(20))
B(1:6,1:8) = A(6:11,1:8);
类别
在 帮助中心 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!