What does this for-loop do?
1 view (last 30 days)
Show older comments
for i=1:numSubj(group)
subj=cell2mat(subjIDs{group}{1}(i, :))
subjDir=[/somewhere/somewhere];
v=dlmread(subjDir);
FCall=(i, :, :)=v;
end
8 Comments
Adam Danz
on 13 Jul 2018
Here's a brief look at what's going on and it's very vague because the code is vague.
for i=1:numSubj(group) %Loop through 1 to some other number defined by numSubj(group)
subj=cell2mat(subjIDs{group}{1}(i, :)) %subj should be a matrix if the code works. subjIDs is a cell array of cell arrays.
subjDir=[/somewhere/somewhere]; % ??? (will break)
v=dlmread(subjDir); % see 'help dlmread'
FCall=(i, :, :)=v; % ?? This will break
end
Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!