« Return to Thread: bug

bug

by yakup murat mert :: Rate this Message:

Reply to Author | View in Thread

octave 3.0.0 gives the following error for the code given below error ...However code still works..

error: cant  perform indexing operstions for <unknown type > type

(gnuplot.exe:1272) : Pango warning : couldnt load font "helvetice not rotated 200 " falling back to "sans not-rotated 200 "  expect ugly output

Code: ----------------------------------------------

% Example 5-3 p 229:  Butterworth Low-Pass Filter
%
 
close all; % close all opened graphs
clear all; % clear all variables
figure;    % open new graph
 
% Normalized components from filter coefficient tables
Ln1 = 1.;  %  Normalized Inductance
Ln2 = 1.;  %  Normalized Inductance 
Cn1 = 2.;  %  Normalized Capacitance
Rg = 50;    % Source resistance
RL = 50;     % Load Resistance
 
wc=2*pi*900e6;  % Cutoff Frequency of 900 MHz
 
L1=Ln1*RL/wc;  %  Actual L1 value
L2=Ln2*RL/wc;  %  Actual L2 value
C1=Cn1/(RL*wc);  %  Actual C1 value
 
f = 1;
for i=1:4000;
  w=2*pi*f;  
  ZL1=j*w*L1;
  ZL2=j*w*L2;
  ZC1=1./(j*w*C1); 
  YC1=1./ZC1;
  GL=1./RL; 
 
  % Define the ABCD matrices for each element of the filter
 
  A0=[1 Rg;0 1];
  A1=[1 ZL1;0 1];
  A2=[1 0;YC1 1];
  A3=[1 ZL2;0 1];
  A4=[1 0;GL 1];
 
  ABCD=A0*A1*A2*A3*A4; 
  freq(i)=f;
  H(i)=2.*1/(ABCD(1)); 
 
  f=f+0.001*wc/(2*pi);
end
 
subplot(211), semilogx(freq,20*log10(abs(H)));grid on; ylim([-50 10]);
title('Low-Pass Butterworth Filter Response'); 
xlabel('Frequency, Hz');
ylabel('Attenuation, dB'); 
 
phase=atan(imag(H)./real(H)); 
subplot(212), semilogx(freq,phase/pi*180);grid on;
xlabel('Frequency, Hz');
ylabel('Phase, deg.');


Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www.cae.wisc.edu/mailman/listinfo/bug-octave

 « Return to Thread: bug