How to write ordinary differantial equations ?bvb
21 次查看(过去 30 天)
显示 更早的评论
F=@(x); dy=@(x,y); x0=; xn=; y= ;h= ;fprintf(‘x\t\t y (Euler)\t y(analytical)\n’); fprintf(‘%f\t %f\t %f\n’,x0,y,f(x0); for x=x0:h:xn-h.. y=y+dy(x,y)*h; x=x+h; fprintf(‘%f\t %f\t %f\n’,x,y,f(x)); end
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!