Dear friends,
It's me again.
Well, after my last visit I have made great progress with my octave code. But, actually I have a new question.
The following code works very well for me.
clear all, clf
K=1; n=K; d=[1 0.2 1 0];
gs=tf(n,d);
[mag_gs,pha_gs,w]=bode(gs);
mag_gs_db=20*log(mag_gs);
h = plotyy(w,mag_gs_db,w,pha_gs);
set (h, 'xscale', 'log','xminortick', 'on'); grid
The problem appears when I try to plot again because I need to plot 2 or 3 times in different steps. For example, if I write
K=20; n=K; d=[1 0.2 1 0];
gs=tf(n,d);
[mag_gs,pha_gs,w]=bode(gs);
mag_gs_db=20*log(mag_gs);
h =plotyy(w,mag_gs_db,w,pha_gs);
set (h, 'xscale', 'log','xminortick', 'on'); grid
the semilogx scale desappear. Here, I include two figure that shows the problem.
If you don't care about loosing the previous plot, do a "clf" before plotting again.
Michael.