bugGNU Octave - Bugs: bug #55570, quiver3 gives error for 4-input...


bug #55570: quiver3 gives error for 4-input form of function

Submitted by:  Doug Stewart <dastew>
Submitted on:  Fri 25 Jan 2019 02:24:36 PM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error
Status:  Confirmed Assigned to:  None
Originator Name:  doug Stewart Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Tue 05 Feb 2019 05:57:35 PM UTC, comment #6:

Priority 1: Update documentation to refer to the 4-argument input form, and remove the 3-input form. Update the text to more accurately describe what is going on.

Priority 2: Update input validation to handle 4-argument input form. Test code which must pass.

Currently this fails with

Changed the Release to refer to the development branch. Although, as a documentation and bug fix it can be backported to stable.

Rik <rik5>
Project Administrator
Sat 26 Jan 2019 07:34:19 PM UTC, comment #5:

Doug - as I mentioned, the Z argument should be required, refer to the Matlab documentation.

Mike Miller <mtmiller>
Project Administrator
Sat 26 Jan 2019 03:49:00 AM UTC, comment #4:

I have a version that now works, but!
Because it has to make up the x,y and z numbers,
the x and y are easy but what to do with the z?
at the moment my version draws the 3d arrows on a flat surface in the z. the arrows can point at any direction in 3d but are all starting on a flat surface in z. I don't know of any other way to make this work.

withe the 4th input being the z height then it would not be on a flat surface.

This could never have worked in the past ( and we had no complaints !)
Any Thoughts?

Doug Stewart <dastew>
Fri 25 Jan 2019 11:10:08 PM UTC, comment #3:

the doc says that
If X, Y, and Z are not given they are assumed to be '(1:M, 1:N,
1:P)' where '[M, N] = size (U)' and 'P = max (size (W))'.

and when I was single stepping through, I saw it create the x,y,z
with integer numbers. so I still thing it will work.

I will keep looking, but it is not very important for this release

Doug Stewart <dastew>
Fri 25 Jan 2019 08:39:32 PM UTC, comment #2:

I don't think the 3-argument form is Matlab compatible, however, after looking at https://www.mathworks.com/help/matlab/ref/quiver3.html.

The Octave documentation seems like it is simply describing the interface incorrectly. There is no 3-argument form, and the 6-argument form requires x,y,z to have the same dimensions as u,v,w, so they cannot be the output of a 3-nargout call to meshgrid.

There is a 4-argument form that is not documented in Octave's doc string at all, where X and Y are implied and Z defines the surface on which the vector field is plotted.

So going back to the example in Octave's doc string, this should not be expected to work:

But this should work, and currently fails in Octave:

Mike Miller <mtmiller>
Project Administrator
Fri 25 Jan 2019 06:26:54 PM UTC, comment #1:

Confirmed with 5.0.90, and this does not seem to be a regression, just a bug that is never exercised. All of the help and demo examples for quiver3 use the 6-argument form.

This error occurs with both the 3-argument form, when passing in x,y,z as vectors, or as a meshgrid.

Mike Miller <mtmiller>
Project Administrator
Fri 25 Jan 2019 02:24:36 PM UTC, original submission:

The help screen says that it can take 3 inputs
: quiver3 (u, v, w)

but it does not work.
If we take the example from the help documentation

it works. But now to test the three input mode try:
h = quiver3 (u, v, w);

this errors with a very unusual error message:

stopped in /usr/local/share/octave/5.0.1/m/plot/draw/quiver3.m at line 81
81: oldfig = [];
error: _quiver_: operator +: nonconformant arguments (op1 is 15625x1, op2 is 625x1)
error: called from
_quiver_ at line 197 column 10
quiver3 at line 87 column 10
testquiver3 at line 5 column 3

Doug Stewart <dastew>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by dastew (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-05 rik5 Release5.0.90 => dev
        Summaryquiver3 gives error for 3 inputs => quiver3 gives error for 4-input form of function
    2019-01-25 mtmiller StatusNone => Confirmed
        Release5.0.1 => 5.0.90

    Back to the top

    Powered by Savane 3.4