How to store cell array values from a for loop into another array/matrix?
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!