how to add values of each iteration to a variable?

1 次查看(过去 30 天)
i have to store the values of every iteration.. but i got only the last values.. what correct i have to do? here is my code
if true
[loc,ctr]=kmeans(hogfeat,20);
b=unique(loc);
for i=1:size(b,1)
c=hogfeat(find(loc==b(i,1)));
end
end

采纳的回答

Walter Roberson
Walter Roberson 2014-2-25
c{i} = hogfeat(find(loc==b(i,1)));

更多回答(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