Recent update
stubborn?
November 21st, 2008 by nugnux
Its hard to believe that you’re explode just a minute after we’re…
Posted in diary | | | 0 Comments
night november
November 21st, 2008 by nugnux
Its rain tonight, and my heart is stabbed
Its cold tonight, and my head is frozen
it just like tears flew as we are cryin’,
my blood refuse. to flow
and like river in the winter, it gonna hard
Posted in diary | | | 0 Comments
hhh…
November 20th, 2008 by nugnux
Hanya karena dia tak mencintaimu dengan cara yang kau inginkan, bukan berarti dia tak mencintaimu dengan sejuta cara lainnya.
Hanya karena Tuhan tidak memberi apa yang kita inginkan, bukan berarti Dia tidak memberi apa yang kita butuhkan.
Ku masih hidup
Dia masih mencintaiku
Posted in diary | | | 0 Comments
First on Fortran
November 19th, 2008 by nugnux
My first program written in fortran is below
!================================================
PROGRAM Grafik
IMPLICIT NONE
!declare variable
REAL :: gaya,ygaya,k,ky,a,ay,m,v,vy,t,x,y,z
REAL :: sbx,sby,sbz,g,fx,fy,fz
REAL :: r,dt,dx,dy,dz,dv,dvy,theta,phi
INTEGER :: i,j,n
!initial value
r =100
g =10
n =10000
k =10000
ky =1000
t=0
dt=0.001
!dx=0.01
m=10
v=0
x=10
y=10
vy=0
!create new file named data.dat (you may change the extension. I used that as I think .dat is cool extension )
OPEN (80, FILE = ‘data.dat’, STATUS = ‘NEW’, FORM = ‘FORMATTED’)
WRITE(80,*) ‘ i t x y’
CLOSE(80)
OPEN(80, ACCESS = ‘APPEND’, FILE = ‘data.dat’, FORM = ‘FORMATTED’)
!the algorithm
DO i=1,n
gaya=-k*x
a=gaya/m
dv=a*dt
v=v+dv
dx=v*dt
x=x+dx
ygaya=-ky*y
ay=ygaya/m
dvy=ay*dt
vy=vy+dvy
dy=vy*dt
y=y+dy
t=t+dt
!write the result of calclation to data.dat
WRITE(80,81) i, t, x, y
81 FORMAT(i7,’ ‘e14.7,’ ‘,e14.7,’ ‘,e14.7)
END DO
CLOSE(80)
END PROGRAM Grafik
!===========================================
save to grafik.f90 then compile using this syntax
$gfortran grafik.f90
that’ll produce file named a.out
run using
$./a.out
and data.dat will appear
to plot the graphic using value in data.dat I use kst
$kst -x 2 -y 3 data dat
mean kst will use 2nd column as x-axis n 3rd as y-axis
Yeah, I know that the steps look boring, so I used sh script below to generate it automatically.
using kwrite, create text file like below:
rm *.dat
gfortran grafik.f90
./a.out
kst -x 2 -y 3 data.dat
save as run.sh, make it executable then run:
$./run.sh
!I also used script below to generate x, y, z in text file and plot it using kst
!
!DO i=1 ,100
! dt=i
! dt=dt/100
! sbx=r*sin(dt)
! sby=r*cos(dt)
! sbz=dt
! WRITE(80,81) sbx, sby, sbz
! 81 FORMAT(F10.2,’ ‘,e14.7,’ ‘,e14.7)
!END DO
!DO i=1, n
!DO j=1, n
! theta=i
! phi=j
! sbx=r*sin(theta)*cos(phi)
! sby=r*sin(theta)*sin(phi)
! sbz=r*cos(theta)
! !sbz=2
! WRITE(80,81) i, j, sbx, sby, sbz
! 81 FORMAT(i7,’ ‘,i7,’ ‘e14.7,’ ‘,e14.7,’ ‘,e14.7)
! PRINT*, ‘theta: ‘,i,’ ————-’
! PRINT*, ‘phi: ‘,j,’ ————-’
! PRINT*, ’sb-x :’, sbx
! PRINT*, ’sb-y :’, sby
! PRINT*, ’sb-z :’, sbz
!END DO
!END DO
There is something strange in two script above. The result is x, y, z (THREE variable) but why the plot is just in TWO axis? Err…, that the weakness of kst.
At prior time :), I used gnuplot to generate “3D” picture–of course, it just projection of z-axis (or x-axis if you using left-handed coordinate)–but I have’nt yet found to automating it using .sh script.
If you like to using gnuplot:
$gnuplot
>plot “data.dat” using 2:3 (oops, that still 2D. Plotting data.dat using 2nd and 3rd column)
>splot “data.dat” using 2:3:4 (that is.)
I’ve skimmed “man gnuplot” but did’nt found how to do it automatically
anybody can help me automating it using gnuplot?
oh yeah, almost forget, I use Linux.
Posted in Physicist, fortran | | | 0 Comments
night
November 18th, 2008 by nugnux
I lay in the bed
hearing a crow of bats
it’s night and no one here but me
I won’t die tonight, maybe
but I did’nt felt live
Even my head is full of inspiration
my spirit is empty
someone
help me
blow my attitude
that’s what I need at now
Posted in diary | | | 0 Comments
in the middle of the night
November 18th, 2008 by nugnux
Well, it’s time to start anything seriously. And prove that I’m physicist
Posted in Physicist | | | 0 Comments
Kerontjong
October 25th, 2008 by nugnux
Posted in music | | | 0 Comments
Bass whuatoz..
October 25th, 2008 by nugnux
Posted in music | | | 0 Comments
Mbak Tut Tut, Supri, P I’ib
October 25th, 2008 by nugnux
Posted in Uncategorized | | | 0 Comments
Mbak Tut Tut, Supri, P I’ib
October 25th, 2008 by nugnux
Posted in music | | | 0 Comments
« Previous Entries Next Entries »Categories
- computer (1)
- crazyness (8)
- diary (27)
- fortran (2)
- internet (2)
- linux (1)
- music (8)
- Physicist (5)
- Uncategorized (85)
Archives
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- February 2007
Blogroll

