function L=lifepowr(T) % input vector T of length 8, lifetimes of components of montreal % power grid. Outputs lifetime L of the system. L1=min(T([1 2 7])); L2=min(T([1 5 6 8])); L3=min(T([1 2 3 4 8])); L4=min(T([1 3 4 5 6 7])); L=max([L1,L2,L3,L4]);