MATLAB equivalent for Python code for argmax from array of user defined objects
14 ビュー (過去 30 日間)
古いコメントを表示
Hi, I have an array as shown here. here Bandit is a class I created.
bandits = [Bandit(m1),Bandit(m2),Bandit(m3)];
Now, I want to do the following. Following is a python code which immediately gives me the maxarg of the value of mean from each of these objects.
j = np.argmax([b.mean for b in bandits])
How can I do the same in MATLAB? Kindly help.
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Call Python from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!