Find minimum value in every nth rows
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
David du Preez
am 20 Jul. 2016
Beantwortet: Andrei Bobrov
am 20 Jul. 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.
0 Kommentare
Akzeptierte Antwort
Andrei Bobrov
am 20 Jul. 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),:);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Operators and Elementary Operations 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!