octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #52598] addpath adds a relative path when give


From: Motius
Subject: [Octave-bug-tracker] [bug #52598] addpath adds a relative path when given a relative path
Date: Wed, 6 Dec 2017 07:51:44 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

URL:
  <http://savannah.gnu.org/bugs/?52598>

                 Summary: addpath adds a relative path when given a relative
path
                 Project: GNU Octave
            Submitted by: motius
            Submitted on: Wed 06 Dec 2017 01:51:42 PM CET
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: Motius
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

= SUMMARY =

Octave treats relative paths added with addpath as relative to the current
directory. This used to be MatLab's behavior until it was changed around 2016,
see:

https://www.mathworks.com/help/matlab/release-notes.html?rntext=&startrelease=R2016b&endrelease=R2016b&category=Language+and+Programming&groupby=release&sortby=descending&searchHighlight=

= EXAMPLE =

The scripts below illustrate the changing behavior between MatLab versions:

$ mkdir -p x/foo y/foo
$ printf "function bar\ndisp('x')\n" > x/foo/bar.m
$ printf "function bar\ndisp('y')\n" > y/foo/bar.m
$ /usr/local/MATLAB/R2010b/bin/matlab -nodisplay -nosplash

                                                                              
               < M A T L A B (R) >
                                                                              
     Copyright 1984-2010 The MathWorks, Inc.
                                                                              
  Version 7.11.0.584 (R2010b) 64-bit (glnxa64)
                                                                              
                 August 16, 2010

 
  To get started, type one of these: helpwin, helpdesk, or demo.
  For product information, visit www.mathworks.com.
 
>> cd x    
>> addpath('foo')
>> bar
x
>> cd ../y
>> bar    
y
>> exit

$ /usr/local/MATLAB/R2017b/bin/matlab -nodisplay -nosplash

                                                                              
               < M A T L A B (R) >
                                                                              
     Copyright 1984-2017 The MathWorks, Inc.
                                                                              
     R2017b (9.3.0.713579) 64-bit (glnxa64)
                                                                              
               September 14, 2017

 
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.
 
>> cd x    
>> addpath('foo')
>> bar
x
>> cd ../y
>> bar    
x


thanks to carandraug for the paste and the MatLab link

= OCTAVE =

Octave has the same behavior as earlier versions of MatLab.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52598>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]