bugGNU Octave - Bugs: bug #50452, methods defined as separate...


bug #50452: methods defined as separate function files under +package directory not found

Submitted by:  Marc Dirix <dirixmjm>
Submitted on:  Sat 04 Mar 2017 08:22:35 AM UTC  
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  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.


Tue 22 Aug 2017 06:52:11 PM UTC, comment #1:

Confirmed in the development version of Octave as well.

One notable way this does work is if the class is defined using classdef syntax, and if all the methods are defined in the class body, or at least with prototypes in the class body. For example

Mike Miller <mtmiller>
Project Administrator
Sat 04 Mar 2017 08:22:35 AM UTC, original submission:

If I create the following class (from the documentation)


I am able to use the class as:

>> p = polynomial([-1 0 1])

p = - 1 + X ^ 2

>> display(p)

p = - 1 + X ^ 2

However, if I put this in a +package as follows:

Then the function "display.m" is not resolved.

>> p = polynomial([-1 0 1])

p = <class polynomial>

>> display(p)

p = <class polynomial>

If I insert the display function inside the polynomial.m file it is once more resolved correctly.

So in effect it doesn't register the location of the class correctly.

Marc Dirix <dirixmjm>


(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 mtmiller (Posted a comment)
  • -email is unavailable- added by dirixmjm (Submitted the item)
  • -email is unavailable- added by dirixmjm

    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.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-22 mtmiller CategoryOctave Function => Interpreter
        StatusNone => Confirmed
        Release4.2.1 => dev
        Operating SystemMicrosoft Windows => Any
        SummaryOctave is not resolving class functions in +package folder => methods defined as separate function files under +package directory not found
    2017-03-04 dirixmjm Carbon-Copy- => Added dirixmjm

    Back to the top

    Powered by Savane 3.3