Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
LU gauss
Program gauss real (8), dimension(4, 4) :: mat, L=0.d0, U=0.d0, LU=0.d0 integer :: i, a, k, j real :: m mat = reshape((/4., -6., 1., -12., -2., 7., 7.5, 22., -3., 6.5, 6.25, 15.5, 6., -6., 5.5, -1./), shape(mat)) print*, "Matriz original" print*, " " do i = 1, 4 write(*, '(4f12.4)') mat(i,:) end do do i = 1, 4 L(i, i) = 1.d0 end do do i=1,3 do j= i+1,4 m=mat(j,i)/mat(i,i) L(j,i)=m mat(j,:)=mat(j,:)-m*mat(i,:) end do end do U = mat print*, " " print*, "Matriz U:" print*, " " do i = 1, 4 write(*, '(4f12.4)') U(i,:) end do print*, " " print*, "Matriz L:" print*, " " do i = 1, 4 write(*, '(4f12.5)') L(i, :) end do print*, " " print*, "Matriz LU:" print*, " " LU = matmul(L, U) do i = 1, 4 write(*, '(4f12.5)') LU(i, :) end do End Program gauss
run
|
edit
|
history
|
help
0
Sffgg
Shooting method 1
Cosine series
Secant Method
A_02 JACOBIAN NEWTON'S ITERATIVE METHOD
Fortran Homework 1
A_03 RUNGE KUTTA METHOD O(4)
Practice
Quardratic equation solve
DO END DO