bugGNU Octave - Bugs: bug #39891, run command doesn't execute...


bug #39891: run command doesn't execute function

Submitted by:  Jan Rüegg <rggjan>
Submitted on:  Thu 29 Aug 2013 10:37:47 AM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Wont Fix Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  3.6.4 Operating System:  Any

Add a New Comment(Rich Markup)

You are not logged in

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


Thu 17 Oct 2013 10:20:14 PM UTC, comment #5:

It's more important to keep Octave's ability to define functions in scripts so I'm marking this bug as "Won't Fix".

Rik <rik5>
Project Administrator
Sat 14 Sep 2013 04:15:36 PM UTC, comment #4:

When the function has parameters, I think matlab crashes when one of the function values is accessed...

Jan Rüegg <rggjan>
Thu 29 Aug 2013 04:43:24 PM UTC, comment #3:

IMHO defining functions in script files is more helpful than running a function with "run".
Btw: What happens if the function has parameters?

Torsten <ttl>
Project Member
Thu 29 Aug 2013 01:39:45 PM UTC, comment #2:

For vlfeat, there is a simple workaround.

Instead of doing


You could make this a wrapper into the actual vl_setup script.

You will note that you're abusing an undocumented Matlab feature here. The Matlab docs clearly state that "run" is for script files, not for function files:


Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Thu 29 Aug 2013 01:32:52 PM UTC, comment #1:

This is not a bug, or if it is, we'll have to completely abandon defining functions in script files, a feature that Matlab lacks.

How important is this? Should we abandon an Octave feature in order to make this work?

Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Thu 29 Aug 2013 10:37:47 AM UTC, original submission:

These two lines are in a file "test.m"

function test()



in matlab shows "text" on the command line. Doing the same in octave leads to no result. So matlab seems to parse AND execute the function, while octave only parses the function...

For example, the vl_setup script of the vl_feat toolbox (http://www.vlfeat.org/) doesn't work in octave becauso of that...

Jan Rüegg <rggjan>


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

    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
    2013-10-17 rik5 StatusNeed Info => Wont Fix
        Open/ClosedOpen => Closed
    2013-08-29 jordigh StatusNone => Need Info
    2013-08-29 rggjan Carbon-Copy- => Added -email is unavailable-

    Back to the top

    Powered by Savane 3.3