摘要: 参考视频:5 Simple Steps for Solving Dynamic Programming Problems 引子:最长递增子串(Longest Increasing Subsequence,LIS) LIS([3 1 8 2 5]) = len([1 2 5]) = 3 LIS([5 阅读全文
posted @ 2023-11-01 22:08 码鸽 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 求Lagrange插值多项式 syms x; X = [1, 3/2, 0, 2] Y = [3, 13/4, 3, 5/3] n = length(X); L = sym('1'); P = sym('0'); for i = 1:n % 求出 Li(x) Li = sym('1'); for j 阅读全文
posted @ 2023-11-01 19:52 码鸽 阅读(3) 评论(0) 推荐(0) 编辑
摘要: matlab中polyfit函数的作用是对数据进行数据拟合 有些小伙伴可能搞不清楚polyfit和polyval之间的区别,这里就直接上我的笔记给大家看看吧 %% 普通的多项式拟合 clear;clc; num = 30; x = linspace(0,5,num); % 横轴数据 error = 阅读全文
posted @ 2023-11-01 19:26 码鸽 阅读(853) 评论(0) 推荐(0) 编辑
摘要: 多行公式 % \nonumber 表示不加标号 \begin{align} a &= b+c \nonumber\\ &= d+e+f \\ g &= h+i \end{align} 大花括号 \left\{ \begin{array}{l} x \\ y \end{array} \right. 小 阅读全文
posted @ 2023-11-01 17:21 码鸽 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 第7章-非线性方程求根 不动点:对于\(f(x)\),若存在\(a\)使得\(f(a)=a\),则称 \(x=a\)为\(f(x)\)的不动点。 参考链接:§1.2.6 不动点 7.2 简单迭代法(Jacobi迭代) \[f(x)=0 \iff x = \phi(x) \]利用\(x_{k+1} = 阅读全文
posted @ 2023-11-01 14:17 码鸽 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 统计基础 中心极限定理(Central Limit Theorem) 不知道为啥我看到的中心极限定理有两个版本的表述 (后来发现确实是有两个版本) 第一个版本说:某城市的工资分布是个很奇怪的分布 但如果对该城市进行抽样,每次抽20个人求平均值,抽100次,那么这100个平均值的分布就会是正态分布。 阅读全文
posted @ 2023-11-01 00:21 码鸽 阅读(135) 评论(0) 推荐(0) 编辑