1function met = Metric(type,
class, station)
2% An output metric of a Solver, such as a performance index
4% Copyright (c) 2012-2026, Imperial College London
10 if isempty(emptyMetric)
11 met =
struct(
'type',type,
'class',
class,
'station',station,
'disabled',
false,
'transient',
false);
14 met = emptyMetric; % copying faster than creating a
new struct
17 met.station = station;
20 if isempty(emptyMetric)
21 met =
struct(
'type',type,
'class',
class,
'station',NaN,
'disabled',
false,
'transient',
false);