用MATLAB编写的最大类间方差阈值程序

2024-11-08 17:01:03
推荐回答(1个)
回答1:

在Matlab下输入:edit zhidao_rk4_3.m,然后将下面两行百分号之间的内容,复制进去,保存橘物卖
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function y=zhidao_rk4_3(t,x)
a=0.01;
b=0.02;
y=[x(1)-a*x(1)*x(2);-x(2)+b*x(1)*x(2)];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

在Matlab下圆逗面输入:
t_end=15;
x0=[20;20];
[t,x]=ode45('zhidao_rk4_3',[0,t_end],x0);
plot(t,x);
legend('野兔','狐狸'蚂橘)