Código Python:
Ver originalimport numpy as np
t = np.array([0,6,12,18,24,30,36,42,48,54,60,66,72,78,84,90,96,102,108,114,120,126])
I = np.array([22,23,35,71,103,111,109,100,86,71,59,47,39,32,28,24,22,21,20,19,19,18])
O = np.array([22,21,21,26,34,44,55,66,75,82,85,84,80,73,64,54,44,36,30,25,22,19])
I_medido = np.array([31,50,86,123,145,150,144,128,113,95,79,65,55,46,40,35,31,27,25,24,23,22])
O_medido = np.array([31.0,27.8639473,27.50946632,36.16641502,54.45345972,76.48365895,96.03075768,\
110.77989121,117.60236863,119.41165035,115.89062393,108.88958298,99.46166492,89.72428831,\
79.67787179,70.48778375,62.19028931,54.97755505,48.24565838,42.54311695,38.02757641,34.39941769])
print "%s%26s%18s%19s%18s" % ("t(horas)", "I obs. (m3/seg.)", "O obs. (m3/seg.)", "I prev. (m3/seg.)",\
"O calc. (m3/seg.)")
print('{0} {0} {0} {0} {0}'.format('='*17))
datos = [t,I,O,I_medido,O_medido]
for i, datos in enumerate(t):
print('{0:>17} {1:>17.3f} {2:>17.3f} {3:>17.3f} {4:>17.3f}'.format(t[i], I[i], O[i], I_medido[i], O_medido[i]))
print('{0} {0} {0} {0} {0}'.format('='*17))