Find indices in accumarray syntax
3 views (last 30 days)
Show older comments
Oday Shahadh
on 10 Jan 2017
Commented: Oday Shahadh
on 10 Jan 2017
How can I find the indices in the accumarray syntax below, Thanks in advance
accumarray(OrbNO,elev,[],@(x) max(x)-min(x), 0);
Accepted Answer
Walter Roberson
on 10 Jan 2017
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 Comments
More Answers (0)
See Also
Categories
Find more on Structures in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!