What does this for-loop do?

1 次查看(过去 30 天)
Golnar
Golnar 2018-7-13
评论: Golnar 2018-7-13
for i=1:numSubj(group)
subj=cell2mat(subjIDs{group}{1}(i, :))
subjDir=[/somewhere/somewhere];
v=dlmread(subjDir);
FCall=(i, :, :)=v;
end
  8 个评论
Adam Danz
Adam Danz 2018-7-13
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
Golnar
Golnar 2018-7-13
Thank you. I'm a Research Assistant adapting a script to fit our current set up.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by