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일

0 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Cell Arrays에 대해 자세히 알아보기

질문:

2016년 7월 20일

답변:

2016년 7월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by