help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

3.4.2 MinGW: bode.m (control-2.1.55) gives error


From: Bernhard Weller
Subject: 3.4.2 MinGW: bode.m (control-2.1.55) gives error
Date: Mon, 19 Sep 2011 04:39:37 -0700 (PDT)

I try to get a simple bode diagram using the code below. This works fine in
3.2.4 MinGW (control-1.0.11), but using the latest version I get the
error-message: "Invalid call to get.  Correct usage is: - Built-in Function: 
get (H, P)" (see below for complete trace).

I'm quite far from being able to debug (especially to fix) this myself, it
seems though, that instead of using the "get" function provided by control
(in folder @tfpoly) it tries to use the built in get function.

Any help to fix this is highly appreciated.

Bernhard

-------------------------
%% Circuit constants
R = 10000;
C = 22e-9;
%% Set up transfer function
H = tf([1], [R*C 1]);
%  Generate list of frequencies; must use angular frequencies in bode
command
F = logspace(1, 5, 1000);
Omega = 2 * pi * F;
%  Use bode command to analyze transfer function
[HMag, HPhase, HOmega] = bode(H, Omega);  % <--- Error happens here
HMag   = squeeze(HMag);
HPhase = squeeze(HPhase);
 
%% Make plot
figure(1); clf
%  Magnitude plot on top
subplot(2,1,1)
semilogx(HOmega, 20*log10(HMag), 'k-')
xlabel('\omega, rad/s')
ylabel('|H|, dB')
%  Phase plot on bottom
subplot(2,1,2)
semilogx(HOmega, HPhase, 'k-')
xlabel('\omega, rad/s')
ylabel('\angle H, rad')

----------------------------------------------------

warning: cellfun: passing function body as a string is obsolete; please use
anonymous functions
error: Invalid call to get.  Correct usage is:

 - Built-in Function:  get (H, P)

error: called from:
error:  
C:\Octave\Octave3.4.2_gcc4.5.2\share\octave\3.4.2\m\help\print_usage.m at
line 87, column 5
error:   __cellfun_fcn_V__ at line 1, column 37
error:  
C:address@hidden
at line 39, column 9
error:  
C:address@hidden
at line 27, column 21
error:  
C:\Octave\Octave3.4.2_gcc4.5.2\share\octave\packages\control-2.1.55\__frequency_response__.m
at line 50, column 3
error:  
C:\Octave\Octave3.4.2_gcc4.5.2\share\octave\packages\control-2.1.55\bode.m
at line 58, column 11




--
View this message in context: 
http://octave.1599824.n4.nabble.com/3-4-2-MinGW-bode-m-control-2-1-55-gives-error-tp3823682p3823682.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]