How to get a subtable out of a large table on conditions
5 ビュー (過去 30 日間)
古いコメントを表示
I have a Matlab table A. I want to extract some rows from the table by certain key words and put the result into another table. The old table has 6 columns, I want to extract the first column to have value 'ATL', and the 3rd column to have value '7/7/2015'. How to do that?
tmpTbl = my_prices('ATL',:,'7/7/2015', :,:, :)
But it keeps saying error. I am totally confused here.
Thanks!
0 件のコメント
採用された回答
Mohammad Abouali
2015 年 7 月 9 日
mask=strcmpi(myTable.firstColumn(:),'ATL') & ...
strcmpi(myTable.thirdColumn(:),'7/7/2015');
newTable=myTable(mask,:);
of course change the 'firstColumn', 'thirdColumn', to their appropriate name (also goes for myTable and newTable).
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!