Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
stochastic matrix
implicit none integer,parameter :: N = 3 real x1,x2,x3,x4,x5,x6,x7,x8,x9 integer, dimension (N , N) :: A real T print *, 'Enter values for 3x3 matrix :' read *, x1,x2,x3,x4,x5,x6,x7,x8,x9 A(1 ,:) = (/ x1, x2, x3 /) A(2 ,:) = (/ x4, x5, x6 /) A(3 ,:) = (/ x7, x8, x9 /) print *, sum(A,2) read *, T if ( T /= 1 .and. (x1< 0 .or. x2<0 .or. x3<0 .or. x4<0 .or. & x5<0 .or. x6<0 .or. x7<0 .or.x8<0 .or. x9<0)) then print *, 'This is not a stochastic matrix' else print *, 'This is a stochastic matrix' end if print *, 'A = ', A print *, 'Program finished..' end
run
|
edit
|
history
|
help
0
Shooting method
Practice
Shooting P1
Vi ss. F
Gauss forward elimination
A_04 TRAPEZOIDAL RULE (3(I))
Fortran!
Practice 2(I)
Practice 4(I) recently
fucugigugug