MATLAB迭代算法问题
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/09/13 04:36:10
MATLAB迭代算法问题
dy=2.112*exp(19.837-13636/y)-0.005*y+3.201,
dy为y的增量,每次算一次都要叠加上去.
y的初值是640,终值为670.
求出迭代次数及依次的解.
dy=2.112*exp(19.837-13636/y)-0.005*y+3.201,
dy为y的增量,每次算一次都要叠加上去.
y的初值是640,终值为670.
求出迭代次数及依次的解.
y =
640.0000
640.4870
640.9794
641.4776
641.9816
642.4917
643.0081
643.5309
644.0605
644.5970
645.1408
645.6920
646.2509
646.8178
647.3930
647.9769
648.5697
649.1719
649.7837
650.4055
651.0379
651.6811
652.3356
653.0021
653.6808
654.3724
655.0775
655.7967
656.5306
657.2799
658.0454
658.8279
659.6281
660.4471
661.2858
662.1452
663.0265
663.9308
664.8596
665.8143
666.7963
667.8074
668.8494
669.9244
671.0345
迭代次数 i=45 (初始为640算作第一次)
代码:
y=zeros(100,1);
y(1,1)=640;
i=1
while i
640.0000
640.4870
640.9794
641.4776
641.9816
642.4917
643.0081
643.5309
644.0605
644.5970
645.1408
645.6920
646.2509
646.8178
647.3930
647.9769
648.5697
649.1719
649.7837
650.4055
651.0379
651.6811
652.3356
653.0021
653.6808
654.3724
655.0775
655.7967
656.5306
657.2799
658.0454
658.8279
659.6281
660.4471
661.2858
662.1452
663.0265
663.9308
664.8596
665.8143
666.7963
667.8074
668.8494
669.9244
671.0345
迭代次数 i=45 (初始为640算作第一次)
代码:
y=zeros(100,1);
y(1,1)=640;
i=1
while i