help-octave
[Top][All Lists]

## Re: Bode question

 From: Doug Stewart Subject: Re: Bode question Date: Wed, 26 Mar 2003 20:55:50 -0500 User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130

Moorman wrote:
OK, this is a question born of ignorance. So laugh
at it, chuckle at my lack of knowledge. But, answer
it :-)

I have never used MatLab for any work. I recently
version of Octave to see if the code would run. (v 2.1.36)

Everything is fine until the bode function is
invoked. I then get a message that the first
argument must be a system data structure.

The bode command in the Matlab program is
bode (a, b, c)

a is a 180 x 1 matrix of real numbers
b is a 180 x 1 matrix of complex
c is a 180 x 1 matrix of complex

I found some great help on using both matlab and
octave, including particular invocations of bode
in matlab. For example, one page suggested the following test:

num = [0.2 0.3 1]
den1 = [1 0.4 1]
den2 = [1 0.5]
den = conv(den1, den2)
w = logspace(-1, 1, 50)

[mag, phase] = bode(num, den, w)
When I try this, same error about the
needing to be a system data structure.
Now, I read the material on the internal system data structure, but I am unsure what to do :-(

Again, I apologize for this question. I actually feel so lacking of knowledge in this area that I feel I am probably not even asking a reasonable question. But, I had to try something before
I go back to beating my head against the
wall :-(

Thanks for any insight you can shed or pointers to what to read.

Thanks, Kenny

what you must do is:

sys1=tf2sys(num,den)
[mag, phase] = bode(sys1, w)

Doug Stewart

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------