Find minimum value in every nth rows

1 vue (au cours des 30 derniers jours)
David du Preez
David du Preez le 20 Juil 2016
I have a cell array( see attachment) of 2209x6. The data is hourly and I want to find the smallest value in column 4(SZA) for everyday. Then create a new array with that row and all the columns.

Réponse acceptée

Andrei Bobrov
Andrei Bobrov le 20 Juil 2016
a = CP15OND_SZA(2:end,4);
a(cellfun(@isempty,a)) = {nan};
a = [a{:}]';
[aout,ii]= min(reshape(a,24,[]));
C = CP15OND_SZA(2:end,:);
out = C(ii+(0:24:numel(a)-1),:);

Plus de réponses (0)

Catégories

En savoir plus sur Dates and Time dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by