Find minimum value in every nth rows

1 回表示 (過去 30 日間)
David du Preez
David du Preez 2016 年 7 月 20 日
回答済み: Andrei Bobrov 2016 年 7 月 20 日
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.

採用された回答

Andrei Bobrov
Andrei Bobrov 2016 年 7 月 20 日
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 件)

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by