help-octave
[Top][All Lists]

## Plotting question

 From: Dominique Michel Subject: Plotting question Date: Mon, 26 Mar 2007 07:00:23 +0200

```Hi all,

I am new with Octave and have a problem with the plot function. My system is:
gentoo gnu-linux with octave-2.1.73

I am trying to do a little octave program that will automatise a little the
creation of spice vacuum tube models based on the constant current
characteristic.

All my program is doing for now (I started yesterday with Octave) is to put a
first set of curves in a data structure and try to plot them:

# Ug2=300
# Ug1=f(Ua) Ia=28 mA
a.a.a = [700, -30; 80, -25; 9, -25; 9, -10; 9, 0; 9, 5; 9, 10]
# Ug1=f(Ua) Ia=52 mA
a.a.b = [700, -25; 102, -20; 40, -20; 19, -18; 19, -10; 19, 0; 19, 5; 19, 10]
# Ug1=f(Ua) Ia=76 mA
a.a.c = [700, -20; 110, -15; 50, -15; 22, -10; 22, 0; 22, 5; 22, 10]
# Ug1=f(Ua) Ia=105 mA
a.a.d = [700, -15; 41, -10; 29, -8; 29, 0; 29, 5; 29, 10]
# Ug1=f(Ua) Ia=140 mA
a.a.e = [700, -10; 35, -5; 35, 0; 35, 5; 35, 10]
# Ug1=f(Ua) Ia=192 mA
a.a.f = [600, -5; 40, 0; 40, 5; 40, 10];

I try several thing with plot and gplot:
"gplot a.a.a" show me what I want, but I get only one Ug1=f(Ua) curve.

"plot (a.a.a)" show me Ua=f(Ug1) and I get a second line that I don't know what
it is. How can I get Ug1=f(Ua) with plot and that without the second line?

"gplot a.a" also show me Ua=f(Ug1) and not Ug1=f(Ua). And this is not
consistant with the output of "gplot a.a.a".

"gplot a" give me the same as "gplot a.a", so same problem.

The worst is with "plot(a.a)":
plot (a.a)
error: unary operator `.'' not implemented for `struct' operands
error: evaluating postfix operator `.'' near line 42, column 12
error: evaluating assignment expression near line 42, column 8
error: evaluating if command near line 41, column 3
error: called from `__plt1__' in file
`/usr/share/octave/2.1.73/m/plot/__plt1__.m'
error: evaluating if command near line 58, column 4
error: evaluating if command near line 56, column 2
error: evaluating if command near line 55, column 7
error: evaluating while command near line 44, column 5
error: evaluating if command near line 30, column 3
error: called from `__plt__' in file `/usr/share/octave/2.1.73/m/plot/__plt__.m'
error: called from `plot' in file `/usr/share/octave/2.1.73/m/plot/plot.m'

Same problem with "plot (a)" as with "plot (a.a)".

How can I get this to work.

I try to change my data structure to
a.a.a = [-30, 700; -25, 80; -25, 9; -10, 9; 0, 9; 5, 9; 10, 9]
etc.
but it didn't helped.

Any suggestion will be appreciated.

Dominique

```