Hi,
using latest git on Ubuntu 20.10, mread() using relative paths fails
here. Here is a sample script:
<hansl>
clear
set verbose off
# Set according to your path
string BASE_PATH = "/home/at/tmp"
string DATA_NAME = "matrix.csv"
print "Absolute path"
string filename = sprintf("%s/mread_csv/%s", BASE_PATH, DATA_NAME)
catch matrix m = mread(filename)
if $error
print "Failed to read matrix 'm'"
else
print m
endif
printf "\nUse relative path\n"
set workdir "BASE_PATH"
string filename = sprintf("./mread_csv/%s", DATA_NAME)
catch matrix a = mread(filename)
if $error
print "Failed to read matrix 'a'"
else
print a
endif
# open command works using relative path
open "@filename"
summary
quit
</hansl>
mread() works fine with an absolute path though. The "open" command
handles relative paths without any problem.
Best,
Artur