Find indices in accumarray syntax
조회 수: 1 (최근 30일)
이전 댓글 표시
How can I find the indices in the accumarray syntax below, Thanks in advance
accumarray(OrbNO,elev,[],@(x) max(x)-min(x), 0);
채택된 답변
Walter Roberson
2017년 1월 10일
function idx = maxidx(x)
[~, idx] = max(x);
function idx = minidx(x)
[~, idx] = min(x);
Together with
accumarray(OrbNO,elev,[],@(x) maxidx(x)-minidx(x), 0);
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Cell Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!