随笔分类 -  第二章

摘要:import numpy as np def f(x): return (abs(x + 1) - abs(x - 1)) / 2 + np.sin(x) def g(x): return (abs(x + 3) - abs(x - 3)) / 2 + np.cos(x) 假设我们有一些初始猜测值( 阅读全文
posted @ 2024-10-27 21:18 唐锦珅 阅读(19) 评论(0) 推荐(0)
摘要:import numpy as np from scipy.linalg import eig 定义矩阵 A = np.array([[-1, 1, 0], [-4, 3, 0], [1, 0, 2]]) 计算特征值和特征向量 eigenvalues, eigenvectors = eig(A) 打 阅读全文
posted @ 2024-10-27 21:17 唐锦珅 阅读(20) 评论(0) 推荐(0)