How can i make priority in matlab?
2 次查看(过去 30 天)
显示 更早的评论
i have many stations and i want to choose the highest load cost as first and so on
i have six stations with different loads
0 个评论
采纳的回答
Walter Roberson
2016-3-23
[maxload, maxidx] = max(TheLoads)
now maxload stores the value of the largest of TheLoads, and maxidx stores the index within TheLoads, so it tells you which load is largest.
3 个评论
Walter Roberson
2016-3-23
If TheLoads is a 6 x 365 array, then
[maxload, maxidx] = max(TheLoads);
will have maxload be the maximum per day and maxidx will be the index of the maximum for each day. If your array is 365 x 6 instead, then
[maxload, maxidx] = max(TheLoads, [], 2);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!