Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Characteristics polynomial
Real A(3,3),A1(3,3),B(3,3),A2(3,3),D(3,3),E(3,3),A3(3,3) Data n/3/ Data A/1,0,0,0,1,0,0,0,1/ B0=(-1)**n Write(*,*)B0 k=1 Call trace(n,A,Bx) Do i=1,n Do j=1,n A1(i,i)=A(i,i)-Bx Enddo Enddo Call multi(n,A,A1,B) Bx=Bx/k Write(*,*)Bx k=k+1 Call trace(n,B,Bx) Do i=1,n Do j=1,n A2(i,i)=B(i,i)-Bx Enddo Enddo Call multi(n,B,A2,D) Bx=Bx/k Write(*,*)Bx k=k+2 Call trace(n,D,Bx) Do i=1,n Do j=1,n A3(i,i)=D(i,i)-Bx Enddo Enddo Call multi(n,D,A3,E) Bx=Bx/k Write(*,*)Bx End Subroutine trace(n,A, x) Real A(3,3) Sum=0 Do i=1,n Sum=Sum+A(i,i) Enddo x=Sum Return End Subroutine Multi(n,P,Q,C) Real P(3,3),Q(3,3),C(3,3) Do i=1,n Do j=1,n C(i,j)=0.0 Do k=1,n C(i,j)=C(i,j)+P(i,k)*Q(k,j) Enddo Enddo Enddo Return End
run
|
edit
|
history
|
help
0
Question1(c)
G p
Rand
A_03 EULER'S METHOD
Practice
first
A_02 GUASS SEIDEL METHOD
A_04 TRAPEZOIDAL RULE (3(II))
A_03 TAYLOR_METHOD
A_01 QN:3