next up previous contents
Next: $BLdBj(B1: Up: 1 $BJQ?t4X?t$N%0%i%U(B Previous: 1 $BJQ?t4X?t$N%0%i%U(B

$BNcBj(B1:

$y=\sin x+\sin 3x+\sin 5x$ $B$N%0%i%U$rIA$-$J$5$$!#(B
Fortran $B$N>l9g(B
    
$B%5%s%W%k!&%W%m%0%i%`(Breidai1.f
C $B$N>l9g(B
    
$B%5%s%W%k!&%W%m%0%i%`(Breidai1.c

$BA4BN$,!"reidai1, C $B$G$O4X(B $B?t(B main()) $B$H4X?tI{%W%m%0%i%`(B f $B$N(B 2 $B$D$NItJ,$+$i$J$C$F$$$k!#(B $Bopenpl, fspace2, fmove, fcont, closepl $B$,(B fplot $B$NL?Na$G$"$k!#(B

openpl() $B$OB>$N$9$Y$F$N%0%i%U%#%C%/%9L?Na$K@hN)$C$F8F$S=P$9!#$3$l(B $B$K$h$C$F?^$rIA$/$?$a$N%&%#%s%I%&$,%*!<%W%s$5$l$k!#(B

fspace2() $B$O%&%#%s%I%&$K:BI8$r3d$j?6$k$?$a$KMQ$$$k!#(B


Fortran $B$N>l9g(B 		 call fspace2(x0,y0,x1,y1)

C $B$N>l9g(B fspace2(x0,y0,x1,y1);
$B$H$9$k$H%&%#%s%I%&$N:82<6y$,(B (x0, y0)$B!"1&>e6y$,(B (x1,y1) $B$K(B $B$J$k(B ($BEvA3(B x0<x1, y0<y1 $B$G$J$1$l$P$J$i$J$$(B)$B!#07$&LdBj$K1~$8$FE,Ev(B $B$JCM$r8+$$=P$7$F8F$S=P$9I,MW$,$"$k!#(B $Bfmove(), fcont() $B$O8e2s$7$K$7$F!":G8e$N(B closepl() $B$r@h$K2r@b$7$h$&!#$3$l$O(B openpl() $B$HBP$K$J$kL?Na$G!"(B $B?^7AIA2h$r=*N;$5$;$F8e;OKv$r$9$k$b$N$G$"$k!#uBV$K$J$k!#(B

$B$3$3$^$G2r@b$7$?(B openpl(), fspace2(), closepl() $B$O(B $B



\begin{itembox}[l]{Fortran$B$N>l9g(B}\small
\begin{tex2html_preform}\begin{verbatim}...
........
call closepl
..........\end{verbatim}\end{tex2html_preform}\end{itembox}






\begin{itembox}[l]{C$B$N>l9g(B}\small
\begin{tex2html_preform}\begin{verbatim}.........
..........
closepl();
..........\end{verbatim}\end{tex2html_preform}\end{itembox}



$B$H$$$&7A$K$J$k!#(B

fmove() $B$O!V%Z%s$r0\F0$9$k(B(=move)$B!W(B, fcont() $B$O!V@~$r0z(B $B$-$J$,$i(B ($B$D$J$.$J$,$i(B=continue) $B%Z%s$rF0$+$9!W$H$$$&L?Na$G$"$k!#$D$^(B $B$j!"$3$l$i$NL?Na$G$O2>A[$N%Z%s$r9M$($F!"$=$l$r0\F0$9$k$3$H$K$h$j?^7A$r(B $BIA2h$9$k(B5$B!#(B $B$G$O%3%s%Q%$%k$7$F$+$i \begin{itembox}[l]{Fortran $B$N>l9g(B}
\begin{tabbing}
xxxxxxxxxxxxxxxxxxxxxxx\=\kil...
...$B$7$F2<$5$$(B+\\
\underline{\tt 100}\\
\verb*+oyabun%+
\end{tabbing}\end{itembox}

\begin{itembox}[l]{C$B$N>l9g(B}
\begin{tabbing}
xxxxxxxxxxxxxxxxxxxxxxx\=\kill
{\tt ...
...$B~NO$7$F2<$5$(B }\underline{\tt 100}\\
{\tt oyabun\%}
\end{tabbing}\end{itembox}



Masashi Katsurada $BJ?@.(B10$BG/(B8$B7n(B25$BF|(B