필터 지우기
필터 지우기

How can i make priority in matlab?

조회 수: 2 (최근 30일)
ABDULLA RAHIL
ABDULLA RAHIL 2016년 3월 22일
댓글: ABDULLA RAHIL 2016년 3월 24일
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

채택된 답변

Walter Roberson
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
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);
ABDULLA RAHIL
ABDULLA RAHIL 2016년 3월 24일
many thanks for your help Walter

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by