help-octave
[Top][All Lists]
Advanced

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

Re: Substitute regular operators by element by element operator?


From: Norm Hecht
Subject: Re: Substitute regular operators by element by element operator?
Date: Wed, 28 Jan 2009 08:45:38 -0700

You only need the dot operators in two spots:

1./(s.^2+0.25*s+1)

The additions and multiplication by a scalar don't introduce any
issues with non-conforming matrices.  While this isn't automated,
it does make it simpler to do by hand.

Norm Hecht
Colorado School of Mines


On Jan 28, 2009, at 6:50 AM, Javier Arantegui wrote:

Hi!

Yesterday I wrote an small .m file to plot Bode diagrams. It's the
file mybode.m, attached to this mail. Nothing complicated. Although
showing the grid has been a challenge, I was beginning to think that I
was too stupid to understand how "grid" worked until I found this (*)
today. I'm using Octave 3.0.1. That bug drove me crazy yesterday.

(*) "grid() not working in 3.0.0"
http://groups.google.com/group/comp.soft-sys.octave/browse_thread/ thread/de4086d739e89748/cc544928bee0316c


The use of mybode is very simple. For example,

mybode("1./(s.^2.+.25.*s.+1)",0.2,0.1,10);

draws the bode diagram of the transfer function
1/(s^2+0.25*s+1)*exp(-0.2) between Omega=0.1 and Omega=10. I
programmed it because I didn't want to use dB and to include the
effect of a delay.

Obviously to make this script work the function has to be introduced
using the element by element operators. Is there an easy way to
transform 1/(s^2+0.25*s+1) to 1./(s.^2.+.25.*s.+1)? My objective would
be that I could type the function using regular operators directly,
like this:

mybode("1/(s^2+25*s+1)",0.2,0.1,10);

If it is not easy, it's not a problem at all.

Thanks in advance,

Javier<mybode.m>_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave



reply via email to

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