Azzera filtri
Azzera filtri

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

1 visualizzazione (ultimi 30 giorni)
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!

Risposte (0)

Categorie

Scopri di più su Characters and Strings in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by