matlab
matlab实验
德哥是程序员
java开发工程师
展开
-
使用matlab实现随机森林仿真
这几天在网上看到一篇关于随机森林的文章,感觉挺有趣的,就在这简单地总结了一下随机森林,并使用matlab来仿真实现。随机森林随机森林使用了元胞自动机模型,其中每个元胞有三种状态:无树、着火、有树。其中每个元胞的演变规则如下:(1)表示有树状态的元胞如果四周有一个元胞表示着火状态,则下一时刻这个元胞位置变为着火状态;(2)已经着火的元胞下一时刻变为空元宝;(3)每一个表示有树状态的元胞以一个很小的概率变为着火状态;(4)每一个空元胞以一定的概率变为有树状态(表示种树)算法设计策略在给出代码之前原创 2020-09-04 15:48:16 · 8408 阅读 · 2 评论 -
雅可比(Jacobi)及高斯-塞德尔(Gauss_Seidel)迭代法求解线性方程组的matlab现实
雅可比迭代法的实现代码:function X=Jacobi(A,B,P,delta,max1)%Input -A is a X*N nosingular matrix% -B is a N*1 matrix% -P is a N*1 matrix ;the initial guess% _delta is the tolerance of P% -max...原创 2020-03-21 18:52:19 · 1389 阅读 · 0 评论 -
矩阵的LU分解(带选主元)求解线性方程组的matlab代码实现
function X=lufact(A,B)%Input -A is a N*N matrix% -B is a N*1 matrix%output X is a n*1 matrix containing the solution to AX=B[N,N]=size(A);X=zeros(N,1);Y=zeros(N,1);R=1:N;%reserve the row p...原创 2020-03-18 11:09:50 · 2229 阅读 · 0 评论 -
二分法(Bisection Method),黄金分割法(Golden Section Method),斐波那契法(Faboncci Method)的matlab实现
Case 1: Bisection Method(1) Write a Matlab function which takes a, b and thed as input , a and b are the left end point and right end point of the interval and thed is precision requested, to achieve...原创 2020-03-18 11:01:50 · 1554 阅读 · 0 评论