table / timetable - removing zero columns
古いコメントを表示
My answer is:
function pTable = aRemoveZeroTableColumns(primersTable)
%
%
%
pTable = primersTable;
indexes = [];
for i = 1:numel(primersTable.Properties.VariableNames)
column = primersTable{:,i};
if all(column == 0)
indexes = [indexes, i];
end
end
pTable(:,indexes) = [];
end
Is there a shorter solution?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Tables についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!