admin管理员组文章数量:1130349
% matlab script to illustrate stiffness
% using simple flame propagation model
close all
clear all
% define the right-hand side of the ODE
F = inline('y^2 - y^3','t','y');
delta = 0.01; % not stiff
tic
ode23(F,[0 2/delta],delta);
toc
disp('Press any key to continue.')
pause
% try again, this time with stiffness ...
delta = 0.0001;
tic
ode23(F,[0 2/delta],delta);
toc
disp('Press any key to continue.')
pause
% now use a stiff solver to solve the problem
tic
ode23s(F,[0 2/delta],delta);
toc% matlab script to illustrate stiffness
% using simple flame propagation model
close all
clear all
% define the right-hand side of the ODE
F = inline('y^2 - y^3','t','y');
delta = 0.01; % not stiff
tic
ode23(F,[0 2/delta],delta);
toc
disp('Press any key to continue.')
pause
% try again, this time with stiffness ...
delta = 0.0001;
tic
ode23(F,[0 2/delta],delta);
toc
disp('Press any key to continue.')
pause
% now use a stiff solver to solve the problem
tic
ode23s(F,[0 2/delta],delta);
toc本文标签: MATLABillustratestiffness
版权声明:本文标题:Matlab illustrate stiffness 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/jiaocheng/1758303869a2777888.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论