[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #47763] saving a function handle to user funct
From: |
Guillaume |
Subject: |
[Octave-bug-tracker] [bug #47763] saving a function handle to user function saves full path |
Date: |
Fri, 22 Apr 2016 18:14:47 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
Follow-up Comment #4, bug #47763 (project octave):
With a core function (bar()):
>> type /tmp/bar.m
function bar
disp('Hello')
>> addpath /tmp
>> % create bar.mat with Matlab
>> cd ~
address@hidden;
>> functions(f)
ans =
function: 'bar'
type: 'simple'
file: '/tmp/bar.m'
>> save bar.mat f -v6
>> % load when file is where expected and in the path
>> addpath /tmp
>> load bar.mat
>> functions(f)
ans =
function: 'bar'
type: 'simple'
file: '/tmp/bar.m'
>> f()
Hello
>> % load when file is where expected but not in the path
>> rmpath /tmp
>> load bar.mat
>> functions(f)
ans =
function: 'bar'
type: 'simple'
file: '/usr/local/MATLAB/R2016a/toolbox/matlab/specgraph/bar.m'
>> f()
Error using bar (line 47)
Not enough input arguments.
>> % load when file is elsewhere in the path
>> movefile('/tmp/bar.m',pwd)
>> load bar.mat
>> functions(f)
ans =
function: 'bar'
type: 'simple'
file: '/home/foo/bar.m'
>> f()
Hello
With a core function, the behaviour is the same apart from many warning to be
displayed:
Warning: Function plot has the same name as a MATLAB builtin. We suggest you
rename the function to avoid a potential name conflict.
Re your change of summary: as mentioned in my previous comment, the issue is
with load and not save (there's a separate bug report for that, bug #43215).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?47763>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #47763] Loading a function handle variable from a MAT-file, Guillaume, 2016/04/22
- [Octave-bug-tracker] [bug #47763] Loading a function handle variable from a MAT-file, Guillaume, 2016/04/22
- [Octave-bug-tracker] [bug #47763] saving a function handle to user function saves full path, Mike Miller, 2016/04/22
- [Octave-bug-tracker] [bug #47763] saving a function handle to user function saves full path, Guillaume, 2016/04/22
- [Octave-bug-tracker] [bug #47763] saving a function handle to user function saves full path,
Guillaume <=
- [Octave-bug-tracker] [bug #47763] saving a function handle to user function saves full path, Mike Miller, 2016/04/22
- [Octave-bug-tracker] [bug #47763] load: function handle to user function uses full path, should just search load path, Mike Miller, 2016/04/22
- [Octave-bug-tracker] [bug #47763] load: function handle to user function uses full path, should just search load path, Guillaume, 2016/04/25
- [Octave-bug-tracker] [bug #47763] load: function handle to user function uses full path, should just search load path, Guillaume, 2016/04/25