07. 4-1 plotting a data file (with gnuplot)
Thanks! Share it with your friends!
You disliked this video. Thanks for the feedback!
Sorry, only registred users can create playlists.
program outputdata
implicit none
real, dimension(100) :: x, y
integer :: i
! setup x and y with some data
do i=1,100
x(i) = i * 0.1
y(i) = sin(x(i)) * (1-cos(x(i)/3.0))
end do
! output data to a file
open(1, file='data1.dat', status='new')
do i=1,100
write(1,*) x(i), y(i)
end do
close(1)
end program outputdata
Uni. Of Cambridge
Dep. Of Physics
Computational Physics
Self-study guide 2
Programming in Fortran 95
Thanks to Dr. Rachael Padman and Michaelmas for allowing the citation.
참고사이트 https://www.mrao.cam.ac.uk/~rachael/compphys/SelfStudyF95.pdf
#fortran #Dr._Rachael_Padman_and_Michaelmas #fortran_tutorial #vfun #NAG_Fortran #FTN95
Show more