Topic: Simulation of Water Waves
Can you make a Matlab livescript simulating water waves generated by a fan in a water tank? The water tank is 0.42 m long, 0.36 m wide. The wind speed is 2.5 m/s and it blows parallel to the water over the whole tank.

Topic: Simulation of Water Waves
Using python to write a function "modularity_gain" so that this code works: G = nx.complete_graph(6)
m1 = nx.algorithms.community.modularity(G, [[0, 1, 2], [3, 4, 5]])
m2 = nx.algorithms.community.modularity(G, [[0, 1], [2, 3, 4, 5]])
nx_gain = m2 - m1
nx_mod = nx.algorithms.community.modularity
del nx.algorithms.community.modularity
try:
    A = nx.to_numpy_array(G)
    m = G.number_of_edges()
    ee = expected_edges(A, m)
    gain = modularity_gain(A, ee, 2, [0, 1], [3, 4, 5], m)
except:
    raise AssertionError('networkx modularity usage')
finally:
    nx.algorithms.community.modularity = nx_mod
    del nx_mod
assert np.isclose(nx_gain, gain)