How to convert script from fortran90 to matlab language
Mostrar comentarios más antiguos
Can anyone help me to covert this script
Thank you
DIMENSION KB(10) KA(10)
KL=0
KS=1
DO 210 K=1,N0
K1=K+1
IF(A(K)*A(K1).LT.0.)THEN
KS=-KS
IF(KS.EQ.-1)THEN
KL=KL+1
KA(KL)=K1
ENDIF
IF(KS.EQ.1)THEN
KB(KL)=K
ENDIF
ENDIF
210 CONTINUE
IF(KL.GT.0)THEN
DO 230 KQ=1,KL
KAL=KA(KL)
KBL=KB(KL)
K0=KAL-1
K1=KBL+1
XA=H*FLOAT(K0)
XB=H*FLOAT(K1)
FA=A(K0)
FB=A(K1)
DO 220 K=KAL,KBL
XK=H*FLOAT(K)
A(K)=FA+(FB-FA)*(XK-XA)/(XB-XA)
220 CONTINUE
230 CONTINUE
ENDIF
1 comentario
Fabio Freschi
el 27 de Oct. de 2019
this is not a complete Fortran script (and it doesn't use F90 syntax): some variable are missing, such as N0,
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Fortran with MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!