You do not use the obtained variable indexes at all, but most likely it is required to determine the player also. As long, as we do not know how the players are represented in yout program, any suggestion would be a bold guessing only, and therefore it could be more confusing than helpful.
Celll and Structure Array
6 次查看(过去 30 天)
显示 更早的评论
I would like to use the 'sort' and 'pickOne' functions to get the strikeouts along with the player that made the said strikeouts for the TOP 20 PLAYERS. For some reason, the code I wrote is only giving me the strikeouts, it is not telling me who the player is that made the strikeout. Any suggestions would be appreciated.
Here goes:
[sorted,indexes]=sort(strikeouts,'descend');
for r=1:20
sorted(r)
players=pickOne(M,'playerID',{ M.playerID })
end
%%like I said, this code is only giving me the top 20 strikeouts in descending order, it is not telling me who the player is that made said strikeout.
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!