- #1
s_hy
- 61
- 0
hi all
I am new learner on fortran. as a part of practice, i am trying to translate below equation into fortan. I have read about interpolation, but couldn't understand it well. Can anyone here help me to translate interp1 funtion into fortran90...thank you very much.
I am new learner on fortran. as a part of practice, i am trying to translate below equation into fortan. I have read about interpolation, but couldn't understand it well. Can anyone here help me to translate interp1 funtion into fortran90...thank you very much.
Code:
for i=ja:jb
Ez(ia,i) = Ez(ia,i) + cb1(ia,i)*interp1(1:length(Hinc),Hinc,PLT(ia-1,i))*CosA;
Ez(ib,i) = Ez(ib,i) - cb1(ib,i)*interp1(1:length(Hinc),Hinc,PLT(ib,i))*CosA;
end
for i=ia:ib
Ez(i,ja) = Ez(i,ja) + cb1(i,ja)*interp1(1:length(Hinc),Hinc,PLT(i,ja-1))*SinA;
Ez(i,jb) = Ez(i,jb) - cb1(i,ja)*interp1(1:length(Hinc),Hinc,PLT(i,jb))*SinA;
end