⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 program_7b.m

📁 《Dynamical Systems with Applications using MATLAB》源代码
💻 M
字号:
% Chapter 7 - Differential Equations.
% Program_7b - Solution curves, initial value problem.
% Copyright Birkhauser 2004. Stephen Lynch.

% Solve the differential equation and plot 2 solution curves.
clear
deqn1=inline('P(1)*(100-P(1))/1000','t','P');
[t,P1]=ode45(deqn1,[0 100],50);
[t1,P2]=ode45(deqn1,[0 100],150);
hold on
plot(t,P1(:,1))
plot(t1,P2(:,1))
axis([0 100 0 200])
fsize=15;
set(gca,'xtick',[0:20:100],'FontSize',fsize)
set(gca,'ytick',[0:50:200],'FontSize',fsize)
xlabel('t','FontSize',fsize)
ylabel('P','FontSize',fsize)
hold off

% End of Program_7b.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -