Results from a loop in one table
Show older comments
Hello,
I am using a loop to calculate Area, Perimeter, etc. of some particles from a set of pictures and I would like to save the results from all the iterations in one table. I only manage to get the results from the last one. When i tried indexing I get an error:
Subscripting into a table using one subscript (as in t(i)) is not supported. Specify a row subscript and a variable subscript, as in
t(rows,vars). To select variables, use t(:,i) or for one variable t.(i). To select rows, use t(i,:).
for i=1:5
% rest of code
results = regionprops('table',lm2, 'Area','Perimeter','MinFeretProperties','MaxFeretProperties');
results_total = table;
results_total = [results_total;results];
end
1 Comment
Paul Costache
on 14 Aug 2021
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing 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!