| 查看: 380 | 回复: 0 | ||
springer_木虫 (著名写手)
|
[求助]
上三角法解线性方程组,虽然没报错,但结果不正确。大神们帮忙看看
|
|
上三角法解线性方程组,虽然没报错,但结果不正确,大神们帮忙看看 program main implicit none integer,parameter :: n=4 real :: A(n,n),b(n),x(n) A = reshape([2,1,3,4,0,3,2,5,0,0,7,3,0,0,0,2],[4,4]) b = [50,49,53,12] call uptri(A,b,x,n) write(*,101) x 101 format (T5,'计算结果',/,'x=',4(/F12.6)) end program main subroutine uptri(A,b,x,n) implicit none integer :: i,j,n real :: A(n,n),b(n),x(n) x(n) = b(n) / A(n,n) do i = n-1,1,-1 x(i) = b(i) do j =i+1,n x(i) = x(i) - A(i,j) * x(j) end do x(i) = x(i) / A(i,i) end do end subroutine uptri |
» 猜你喜欢
面上有专家说实验设备不是我们单位的
已经有6人回复
博士去二本高校当辅导员,如何调整心态?
已经有8人回复
27细胞生物学申博
已经有5人回复
江苏省自然基金 什么时候出结果
已经有6人回复
广西大学-广州大学招聘博士后 欢迎广大优秀人才!!!
已经有11人回复
闲聊
已经有3人回复
如何查询2026年获批项目名称?
已经有3人回复
两块石头
已经有10人回复
售SCI一区T0P文章,我:8O.55.1.O.54,科目全,可伽急
已经有15人回复
面上没中,邀请各位路过的虫友分析一下分数
已经有13人回复

找到一些相关的精华帖子,希望有用哦~
求fortran计算方法指导 14元非线性方程组 之前8元的使用bfs法能解14元解不了呀求指导
已经有4人回复
求大神帮忙拟合一个非线性方程,求出模型参数
已经有15人回复
数学小白求助,解超定非线性方程组,求大神帮忙
已经有4人回复
求助,用1stopt解方程组,两次得到的解不唯一?什么原因,大神帮忙
已经有6人回复
sos!!1stopt解非线性方程组,一直出现常数定义错误的问题!求大神帮助!
已经有12人回复
求大神帮忙解病态线性方程组
已经有5人回复
科研从小木虫开始,人人为我,我为人人










回复此楼
点击这里搜索更多相关资源