MATLAB environment variables
10 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a few MATLAB scripts which include the usage of 'matlabfrag' and 'matlabfrag to pdf'. I used them without any problem on my old Ubuntu machine. Now I want to use use them on a MacOS X 10.6 machine and I have the following problem: it seems MATLAB can't find the 'pdflatex'? It is installed on my machine. I got the error message:
/bin/bash: pdflatex: command not found
If I open a terminal I can use 'pdflatex', but not from MATLAB.
I assume it is a problem of setting the environment variables properly. But I don't know how and after one day trying and googleing for answers I hope someone here knows how to do it.
Thank you already in advance, Ralf
0 个评论
采纳的回答
Ralf
2011-2-8
1 个评论
Walter Roberson
2011-2-8
That could be combined in to one:
setenv('PATH', [getenv('PATH') ':/usr/texbin:/usr/local/bin'])
更多回答(1 个)
Walter Roberson
2011-2-4
setenv([getenv('PATH') ':/directory/of/pdflatex/']);
This is code to execute inside Matlab before running the script. You could add it to your startup.m file for example.
There are other avenues for making more permanent changes to your OS-X path, such as modifying your ~/.bashrc or ~/.login
3 个评论
Walter Roberson
2011-2-5
Sorry, should have been
setenv('PATH', [getenv('PATH') ':/directory/of/pdflatex/']);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!