Borrar filtros
Borrar filtros

How can i make priority in matlab?

2 visualizaciones (últimos 30 días)
ABDULLA RAHIL
ABDULLA RAHIL el 22 de Mzo. de 2016
Comentada: ABDULLA RAHIL el 24 de Mzo. de 2016
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 23 de Mzo. de 2016
[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 comentarios
Walter Roberson
Walter Roberson el 23 de Mzo. de 2016
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 el 24 de Mzo. de 2016
many thanks for your help Walter

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with Optimization Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by