Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ベクトル内のエントリを相対的な大きさで効率的にランク付けする、短くて効率的なベクトル操作を見つけようとしています。たとえば、ベクトルが次の場合:
A = [212 314 196];
次を返す関数が必要です。
B = [2 3 1];
私はソート機能をいじっていますが、これまでのすべてのソリューションには、不要な for ループと思われるものがあります。私は困惑しています-誰かがよりエレガントな方法を知っていますか?