Skip to content

Commit

Permalink
Add clarifying comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestiotio authored Mar 19, 2020
1 parent f4846fd commit e10572e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hoa1.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,15 @@ def plot_data_graphs(resistance):
print(f"Efficiency: {efficiency}%")

if __name__ == '__main__':
for resistance_values in [1]:
plot_data_graphs(resistance_values)
for resistance in [1]:
plot_data_graphs(resistance)

resistance_values = np.array([1, 1.2, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6]).astype(np.float64)
voltage_values = np.array([0.176193, 0.193620666666667, 0.247881, 0.3116985, 0.317917, 0.3412875, 0.361429, 0.384375, 0.40167875]).astype(np.float64)
output_power_values = voltage_values ** 2 / resistance_values
output_power_values = output_power_values.astype(np.float64)

# Evidence/justification to remove anomalies
detect_anomalies(output_power_values)

# Remove anomaly
Expand All @@ -365,4 +366,5 @@ def plot_data_graphs(resistance):

plot_actual_boxplot(actual_output_power)

output_power_graph(actual_resistances, actual_output_power)
# Answer question (11)
output_power_graph(actual_resistances, actual_output_power)

0 comments on commit e10572e

Please sign in to comment.