Find indices in accumarray syntax

1 vue (au cours des 30 derniers jours)
Oday Shahadh
Oday Shahadh le 10 Jan 2017
Commenté : Oday Shahadh le 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);
  1 commentaire
Oday Shahadh
Oday Shahadh le 10 Jan 2017
You are great Walter.. Thanks

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 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);

Plus de réponses (0)

Catégories

En savoir plus sur Cell Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by