set title "A half-rectified sine wave by fourier serise" set xlabel "time" set ylabel "Applied Voltage" g(n,x) = -2.*((-1.)**(2/n))*cos(n*x)/(n**2-1)/pi plot \ 1./pi + 1.*cos(x)/2 title "2",\ 1./pi + 1.*cos(x)/2 +g(2,x) title "3",\ 1./pi + 1.*cos(x)/2 +g(2,x) +g(4,x) title"4", \ 1./pi + 1.*cos(x)/2 +g(2,x) + g(4,x) + g(6,x) title "5" set terminal 'png' set output 'filename'
gnuplot 에서 2/3을 하면 int로 받아들여서 0이 됨!!!!
2./3 식으로 type 변환을 해줘야 해!!
곪아 썩어가는 것들을 두 눈에 담기