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 Aug 29 10:37:47 2013  
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: Wont FixAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.6.4Operating System: Any

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


Thu Oct 17 22:20:14 2013, 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 Sep 14 16:15:36 2013, comment #4:

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

Jan Rüegg <rggjan>
Thu Aug 29 16:43:24 2013, 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 Aug 29 13:39:45 2013, 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 Aug 29 13:32:52 2013, 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 Aug 29 10:37:47 2013, 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 File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by ttl (Posted a comment)
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by rggjan (Submitted the item)
  • -unavailable- added by rggjan

    Do you think this task is very important?
    If so, you can click here to 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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Oct 17 22:20:14 2013rik5StatusNeed Info=>Wont Fix
    Thu Aug 29 13:33:07 2013jordighStatusNone=>Need Info
    Thu Aug 29 10:37:47 2013rggjanCarbon-Copy-=>Added -unavailable-

    Back to the top

    Powered by Savane 3.1-cleanup1