摘要:
学号后四位3026 1班 5.4 import numpy as np from scipy.optimize import minimize obj=lambda x:-sum(np.sqrt(x)) a=np.zeros((5,100)) for i in range(4): for j in 阅读全文
摘要:
学号后四位3026 1班 4.3 import cvxpy as cp import pylab as plt import numpy as np 定义变量和目标函数 x = cp.Variable(6, pos=True) obj = cp.Minimize(x[5]) 定义约束条件的系数 a1 阅读全文
摘要:
学号后四位3026 1班 习题 2.1 import numpy as np import matplotlib.pyplot as plt 生成x数据点 x = np.linspace(-5, 5, 400) 计算y值 y_cosh = np.cosh(x) y_sinh = np.sinh(x) 阅读全文
摘要:
学号后四位3026,1班 6.1 import networkx as nx import matplotlib.pyplot as plt L1 = [(1, 2), (1, 3), (1, 4), (2, 3), (2, 6), (3, 4), (4, 5), (5, 6)] G1 = nx.G 阅读全文