フィルターのクリア

Extract cell rows to new array after strfind or strcmp matching.

1 回表示 (過去 30 日間)
Arthur Hajaali
Arthur Hajaali 2016 年 8 月 14 日
編集済み: Geoff Hayes 2016 年 8 月 14 日
Hi everyone, I have an array of data (500*7) and the 7th column is a series of date array, they are all in random order so I would like to rearrange by month_array. So for each cell matching the portion of string '01/2015' i want a loop that extract the all rows (1:7) for example and store it in a new array etc. I have included a picture to ease the understanding.
jan_table = [];
for i=1:size(ship_table);
idx = strfind(ship_table(i,7),'01/2015');
if idx isequal('4')
STORE ROW IN NEW ARRAY jan_table
else
jan_table = [jan_table num2cell(ships_table{i})];
end
end
If anyone could help, thanks!

回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by