plot($B%Y%/%H%k(B), closeplot
$B@)8f9=J8$O(B
while $B>r7o<0(B
$BJ8(B1
$BJ8(B2
...
$BJ8(Bn
end
|
if $B>r7o<0(B
$BJ8(B1
..
$BJ8(Bn
else
$BJ8(B'1
...
$BJ8(B'n
end
|
if $B>r7o<0(B1
$BJ8(B
elseif $B>r7o<0(B2
$BJ8(B
end
|
for i=1:n
$BJ8(B1
...
$BJ8(Bn
end
|
for $BJQ?t(B=$B=i4|CM(B:$B=*N;CM(B $B$^$?$O(B for $BJQ?t(B=$B=i4|CM(B:$BA}J,(B:$B=*N;CM(B
break $B$O%k!<%W$rH4$1=P$9(B
$B!V$+$D!W$O(B &, $B!V$^$?$O!W(B $B$O(B |, $B!VEy$7$/$J$$!W$O(B
~= $B$^$?$O(B != $B$GI=$o$9!#(B
$B$D$^$jH]Dj$O(B ~ $B$^$?$O(B ! $B$H$$$&$3$H$@$m$&$J!#(B
$B%-!<%\!<%IF~NO(B
$BJQ?tL>(B = input('$B2?$+F~NO$7$F2<$5$$(B')
$B!z(BOctave for FreeBSD $B$OF|K\8l$,F~NO$G$-$J$$!#(B
pause $B$^$?$O(B pause($BIC?t(B)
$B1i;;;R$NA0$K(B . [email protected],$4$H$H$$$&0UL#!)(B
c=[1 2 3] $B$KBP$7$F(B c*c $B$O7?$,$*$+$7$$$+$i7W;;$G$-$J$$!#(B
c .* c $B$H$9$k$H(B [1 4 9]
$BJQ?tL>(B=$BCM(B
$B%Y%/%H%k$N>l9g$O(B
[$BJQ?tL>(B1,$BJQ?tL>(B2]=$BCM(B,
[$BJQ?tL>(B1 $BJQ?tL>(B2]=$BCM(B
$B#1JQ?t4X?t$N%0%i%U$rIA$/$K$O!"%Y%/%H%k$r(B2$BK\MQ0U$9$k(B
% y=x^2 $B$N%0%i%U(B
x=0:0.1:10;
y=x.^2;
plot(x,y)
% y=sin(x) $B$N%0%i%U(B
x=0:0.1:10;
y=sin(x);
plot(x,y)
gset term postscript; gset output "foo.ps"; replot
contour(z,$BEy9b@~$N%l%Y%k?t(B,x,y)
n=10; x=(-1:1/n:1)'; y=(-1:1/n:1); z=x*y; contour(z,10,x,y)
mesh(x,y,z) $B$O(B3$B
i, I, j, J $B$O5u?tC10L!"(Bpi $B$O1_<~N(!"(B
e $B$O<+A3BP?t$NDl(B (Napier $B$N?t(B)$B!"(B
inf $B$OL58BBg!"(Beps $B$O7W;;5!%$%W%7%m%s(B
$B$O(B 3+5i $B$GI=$;$k!#(B5 $B$H(B i $B$N4V$K6uGr$rCV$$$F$O(B
$B$$$1$J$$!#(B
real(), imag(), conj(), arg(),
angle() $B$J$I$,;H$($k!#(B
eval($B<0(B) $B$O<0$NI>2A(B
t='1/(i+j-1)'
for i=1:n
for j=1:n
a(i,j)=eval(t);
end
end
$B2hLL=PNO$N@:EY$O(B
format long |
|
format short |
|
format long e |
$BD9$$7e?t!";X?t7A<0(B |
format short e |
$BC;$$7e?t!";X?t7A<0(B |
format free |
$B<+M37A<0(B |
format none |
$B<+M37A<0(B |
quad('$B4X?tL>(B',$B=i4|CM(B,$B=*C
quad8() $B$O(B Octave $B$K$O$J$$!#(B
save -ascii $B%U%!%$%kL>(B $BJQ?tL>(B1 $BJQ?tL>(B2,
save -binary $B%U%!%$%kL>(B $BJQ?tL>(B1 $BJQ?tL>(B2,
save -mat-binary $B%U%!%$%kL>(B $BJQ?tL>(B1 $BJQ?tL>(B2
Next: 3 Octave
Up: MATLAB $B
Previous: 1 $B5/8;(B
Masashi Katsurada
$BJ?@.(B15$BG/(B5$B7n(B8$BF|(B