help-octave
[Top][All Lists]

## Re: bode, "arguments must be scalars" error

 From: A S Hodel Subject: Re: bode, "arguments must be scalars" error Date: Tue, 13 Mar 2007 21:46:05 -0500

```This patch should fix the problem:

```
*** /sw/share/octave/2.1.71/m/control/base/bode_bounds.m Wed Aug 23 08:23:52 2006
```--- bode_bounds.m       Tue Mar 13 21:43:28 2007
***************
*** 64,70 ****
else              cpol = [];                endif
endif

!   if(max(size(iip)) + max(size(iiz)) )
wmin = floor(log10(min(abs([cpol,czer]))));
wmax = ceil(log10(max(abs([cpol,czer]))));
else
--- 64,70 ----
else              cpol = [];                endif
endif

!   if(!(isempty(iip) | isempty(iiz)))
wmin = floor(log10(min(abs([cpol,czer]))));
wmax = ceil(log10(max(abs([cpol,czer]))));
else

On Mar 13, 2007, at 8:26 PM, Doug Stewart wrote:

```
I get the same error. I think the problem is that you have too small of
```a system. Yes it should do this. but??

Try a bigger problem like.

n=1
d=poly([0 -10])
G=tf(n,d);
bode(G)

If you really want the Bode of an integrator I will  help you get it
working.
Doug

Guido Mureddu wrote:
```
Hello, I'm not sure whether this is the correct place to post this, so
```excuse me if it isn't. I'm currently using Octave 2.1.73, on Linux.
I'm trying to get the bode plot of the simple transfer function 1/s.
I try to accomplish this in this way:

| octave:1> G = tf(1, [1 0])
| octave:2> sysout(G)
| Input(s)
|       1: u_1
|
| Output(s):
|      1: y_1
|
| transfer function form:
| 1
| ---------
| 1*s^1 + 0

Which seems to be correct. However, when I try to plot it using the
bode function, it produces this error:

| octave:3> bode(G)
| error: logspace: arguments must be scalars
| error: evaluating if command near line 85, column 3
| error: called from `logspace' in file
`/usr/local/share/octave/2.1.73/m/general/logspace.m'
| error: evaluating assignment expression near line 78, column 9
| error: evaluating if command near line 67, column 5
| error: called from `__freqresp__' in file
`/usr/local/share/octave/2.1.73/m/control/base/__freqresp__.m'
| error: called from `__bodquist__' in file
`/usr/local/share/octave/2.1.73/m/control/base/__bodquist__.m'
| error: called from `bode' in file
`/usr/local/share/octave/2.1.73/m/control/base/bode.m'

What am I doing wrong? My Linux distribution (Ubuntu 6.06) has a
precompiled package of Octave 2.1.72, so I removed it and compiled
2.1.73 hoping it would solve it, but unfortunately, no such luck.

Guido Mureddu
```
--------------------------------------------------------------------- ---
```
_______________________________________________
Help-octave mailing list
https://www.cae.wisc.edu/mailman/listinfo/help-octave

```
```
_______________________________________________
Help-octave mailing list
```