generating an array from the same element across several tables
이전 댓글 표시
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!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Data Type Identification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!