Don't need to 'cd' to toolbox directory to run 'make_gtsam' in matlab

release/4.3a0
Richard Roberts 2011-11-04 11:58:22 +00:00
parent 847e0cb3e4
commit 8fcdfb8cb2
1 changed files with 4 additions and 1 deletions

View File

@ -191,7 +191,10 @@ void Module::matlab_code(const string& toolboxPath,
if (verbose_) cerr << "generating " << makeFile << endl;
emit_header_comment(ofs,"%");
ofs << "echo on" << endl << endl;
ofs << "toolboxpath = pwd" << endl;
ofs << "toolboxpath = mfilename('fullpath');" << endl;
ofs << "delims = find(toolboxpath == '/');" << endl;
ofs << "toolboxpath = toolboxpath(1:(delims(end)-1));" << endl;
ofs << "clear delims" << endl;
ofs << "addpath(toolboxpath);" << endl << endl;
// generate proxy classes and wrappers