Matlab forward Euler
来源:互联网 发布:枪神纪刷枪软件 编辑:程序博客网 时间:2024/06/18 02:21
% forward Euler demo% take two steps in the solution of % dy/dt = y, y(0) = 1% exact solution is y(t) = exp(t)clear allclose all% the exact solutiont = 0:0.01:1;yexact = exp(t);% initial conditionsy0 = 1h = 0.5tt = [0];yy = [y0];% one step of forward Euleryhalf = y0 +h*y0tt = [tt; h];yy = [yy; yhalf];plot(t,yexact)axis([0,1,0,3])hold onplot(tt,yy,'rx-')pause% what family member are we on now?c1 = yhalf/exp(0.5);ymember1 = c1*exp(t);plot(t,ymember1,'g--')pause% step 2 of forward Eulery1 = yhalf + h*yhalftt = [tt; 2*h];yy = [yy; y1];plot(tt,yy,'rx-')pause% what family member are we on now?c2 = y1/exp(1);ymember2 = c2*exp(t);plot(t,ymember2,'c--')
0 0
- Matlab forward Euler
- Matlab forward Euler demo
- Matlab Euler's method
- Matlab实现——Euler's Method
- Matlab编程 Project Euler Problem24 : Lexicographic permutations
- Matlab实现——Forward-substitution
- Euler
- Matlab 编程 Project Euler Problem 20 Factorial digit sum
- Matlab 编程 Project Euler Problem 21 Amicable numbers
- Matlab 编程 Project Euler Problem 22 Names scores
- forward
- forward
- MATLAB Code For Inverse and Forward Kinematics (Newton-Raphson Method)
- MATLAB实现构造Euler环游图的算法——数学建模
- 【转】MATLAB实现构造Euler环游图的算法——数学建模
- Project Euler
- project euler
- euler测试
- Matlab interpgui
- Matlab piecelin
- Matlab splinetx
- Matlab pchiptx
- Matlab adaptive quadrature
- Matlab forward Euler
- Matlab lorenzgui
- Matlab Gauss-Laguerre
- 为啥还要写呢?——北漂18年序言
- javascript 判断字符串是否包含某字符串(indexOf)
- Java并发编程之闭锁CountDownLatch简介
- POJ1274 The Perfect Stall【二分图最大匹配】
- 2015--阿里内推--测试开发--技术一面--(通过)
- java用cmd,import自己写的类。出现问题:无法找到或加载主类