generating an array from the same element across several tables
Show older comments
Hi,
I have n similar tables (same structure, different data).
I have collected all tables in a cell array, so that Tarray{1} gives the first table, Tarray{2} gives the 2nd table and so on.
Tarray{i}{2,3} gives the content (a scalar value) of the element of table i, row 2, column 3.
I would like to create an array from the scalar values contained in position (2,3) across all tables. This can be done with the following code:
array = zeros(length(Tarray),1);
for ii = 1:length(Tarray)
array(ii) = Tarray{ii}{2,3};
end
Is there a better/faster way to do that?
Thanks!
Accepted Answer
More Answers (0)
Categories
Find more on Data Type Identification 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!