Skip to content

Commit ac00e94

Browse files
committed
full path to script so can run from different matlab cwd
1 parent 7d04082 commit ac00e94

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

marg_maxent2.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44

55
fname = tempname;
66
save(fname,'P')
7-
cmd = sprintf('python mme2.py %s',fname);
7+
8+
thism = mfilename('fullpath');
9+
[folder, name, ext] = fileparts(thism);
10+
11+
cmd = sprintf('python %s/mme2.py %s',folder,fname);
812
status = system(cmd);
913

1014
if status~=0

marg_maxent_3pred.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
% error('only 3 variables supported')
66
% end
77

8+
thism = mfilename('fullpath');
9+
[folder, name, ext] = fileparts(thism);
10+
811
fname = tempname;
912
save(fname,'P')
10-
cmd = sprintf('python mme3pred.py %s',fname);
13+
cmd = sprintf('python %s/mme3pred.py %s',folder,fname);
1114
status = system(cmd);
1215

1316
if status~=0

pid_broja.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66
error('only 3 variables supported')
77
end
88

9+
thism = mfilename('fullpath');
10+
[folder, name, ext] = fileparts(thism);
11+
912
fname = tempname;
1013
save(fname,'P')
11-
cmd = sprintf('python pidbroja.py %s',fname);
14+
cmd = sprintf('python %s/pidbroja.py %s',folder,fname);
1215
status = system(cmd);
1316

1417
if status~=0

pid_broja_dist.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66
error('only 3 variables supported')
77
end
88

9+
thism = mfilename('fullpath');
10+
[folder, name, ext] = fileparts(thism);
11+
912
fname = tempname;
1013
save(fname,'P')
11-
cmd = sprintf('python pidbrojadist.py %s',fname);
14+
cmd = sprintf('python %s/pidbrojadist.py %s',folder,fname);
1215
status = system(cmd);
1316

1417
if status~=0

0 commit comments

Comments
 (0)