Bode Diagram and how can I plot those functions on different graph windows ?

Reinaldo tiraduvidascefet at yahoo.com
Mon Sep 19 17:06:59 CEST 2011


Hi Scilab users,
 
I could plot the following functions (i.e., absolute value and logarithmic function modules and phase function) in just one window.
 
However, as you can run and see, the subtitles are mixing ... that's my problem !
 
Well, in case it is possible to separate those subtitles to be visible, how could I do it ?
 
In case it is not possible to separate them, how could I plot on different graph windows ?
 
The Scilab script is shown, as follows. This script is based on the Bode's Diagram in Scilab demonstration example.
 
stacksize(15000000); // Define "s" as variable  // (s é um polinômio de raiz zero) s = poly(0,'s'); // Define the transfer function:
H = (s)/(s+1); // Define the frequency range (Hz) f = 0.001:0.001:100; // Calculate the frequency-response:
y = freq(H.num,H.den,2*%pi*%i*f); // Calculate the absolute value function module:
yabs = abs(y); // Calcula the function module in dB ym = 20*log10(abs(y)); 
// Calculate the phase function in degree: yf = (180/%pi)*atan(imag(y), real(y)); // open and clean the graph window xbasc(), // Divide the graph window in three rows: subplot(3,1,1), plot2d('ln',f,yabs,style=2), xgrid(), xtitle("Modulo em valores absolutos da Função de Transferência","Freqüência [Hz]","Módulo em dB");
subplot(3,1,2), plot2d('ln',f,ym,style=2), xgrid(), xtitle("Modulo em dB da Função de Transferência","Freqüência [Hz]","Módulo em dB"); 
subplot(3,1,3), plot2d('ln',f,yf,style=3), xtitle("Fase da Função de Transferência","Freqüência [Hz]","Fase em Graus"); xgrid(); // end
 
Thank you very much !
 
All best,
Reinaldo.
 
PS: send to me the modified Scilab script as attachment. Tnx.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110919/55bf7892/attachment.htm>


More information about the users mailing list