"line" throws invalid vector value exception in __jhandles_set

View: New views
2 Messages — Rating Filter:   Alert me  

"line" throws invalid vector value exception in __jhandles_set

by LouisCutrona :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steps to reproduce from Octave 3.0.0 console:

  xx=[1,2,3,4,5;1,2,3,4,5]
  yy=[.2,.2,.2,.2,.2;-.2,-.2,-.2,-.2,-.2]
  line(xx,yy)


Console log:

octave.exe:1> xx=[1,2,3,4,5;1,2,3,4,5]
xx =

   1   2   3   4   5
   1   2   3   4   5

octave.exe:2> yy=[.2,.2,.2,.2,.2;-.2,-.2,-.2,-.2,-.2]
yy =

   0.20000   0.20000   0.20000   0.20000   0.20000
  -0.20000  -0.20000  -0.20000  -0.20000  -0.20000

octave.exe:3> line(xx,yy)

error: [java] org.octave.graphics.PropertyException: invalid vector value - [ (2 by 5) array of double ]
error: evaluating for command near line 32, column 11
error: evaluating if command near line 31, column 9
error: evaluating for command near line 29, column 7
error: evaluating if command near line 24, column 5
error: called from `__jhandles_set' in file `C:\Program Files\Octave\share\octave\packages\jhandles-0.3.1\__jhandles_set.m'
error: evaluating if command near line 32, column 3
error: called from `__jhandles_go_line' in file `C:\Program Files\Octave\share\octave\packages\jhandles-0.3.1\__jhandles_go_line.m'
error: evaluating assignment expression near line 63, column 5
error: called from `__line__' in file `C:\Program Files\Octave\share\octave\3.0.0\m\plot\__line__.m'
error: evaluating assignment expression near line 38, column 7
error: called from `line' in file `C:\Program Files\Octave\share\octave\3.0.0\m\plot\line.m'
octave.exe:3>


Same steps execute without error using GnuPlot.

Re: "line" throws invalid vector value exception in __jhandles_set

by LouisCutrona :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

LouisCutrona wrote:
Same steps execute without error using GnuPlot.
I think I was wrong about producing correct output using GnuPlot.  I think the code specified should produce a series of discrete vertical lines, which is what I understand it does in Matlab.  What it produces with GnuPlot is a sawtooth in which the lines drawn are connected tail to head.