% Hz’PˆÊ‚ÌBode�ü�}
% 2005.08.10 �¬�ì Octave—p
%

clear;

num = [ 0 1];
den = [ 1 1 1];

SYS = tf2sys(num,den,0);

[Gain,Phase,w] = bode(SYS);

subplot(2,1,1);
%figure(1);
grid('on')
%xlabel('[Hz]')
ylabel('Gain[dB]')

%”ÍˆÍŽw’è
axis([ 0.01 10 -20 0],'auto');
%axis([ 0.01 10 -20 0]);

semilogx(w/(2*pi()),20*log10(Gain),'-;;');



subplot(2,1,2);
%figure(2);
xlabel('[Hz]')
ylabel('Phase[deg]')
grid('on')

%”ÍˆÍŽw’è
axis([ 0.01 10 -180 180],'auto');
%axis([ 0.01 10 -180 180]);

semilogx(w/(2*pi()),Phase,'-;;');

%•Û‘¶ [Hz],[dB],[deg]
savedata = [ w/(2*pi()) 20*log10(Gain) Phase];
save -ascii savedata.txt savedata



