How to store cell array values from a for loop into another array/matrix?
显示 更早的评论
Hi,
I am trying to store my output values from my for loop into another cell array/matrix. So far this is my code:
fileID = fopen('sample.txt');
C = textscan(fileID,'%s');
for n = 0:5
s = C{1}{(3+8*n)}
end
As you can see, im trying to store every 3 +8n th term from a txt file into an array and im not quite sure how to do this for a cell array. Is there any method on how to do this?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!