Extract cell rows to new array after strfind or strcmp matching.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!