engOpen fails on Mac with "matlab: command not found"
Mostrar comentarios más antiguos
When I execute engOpen(NULL) on a Mac in C++, I get "matlab: command not found". When I provide the complete path to the matlab command to engOpen(), I get "matlab: line 380: awk: command not found" and "matlab: line 396: expr: command not found".
Matlab works fine, i.e., "matlab -e" at the command prompt shows the environment.
I thought this was a problem with PATH, but if I export PATH with the Matlab bin folder included, it doesn't fix the problem.
Any ideas?
Respuestas (2)
David Chassin
el 2 de Jul. de 2012
1 voto
Walter Roberson
el 2 de Jul. de 2012
0 votos
Odd, in OS-X (Leopard), I find /bin/expr and /usr/bin/awk .
Is your C++ program possibly fiddling with your PATH environment variable?
Categorías
Más información sobre Call MATLAB from C en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!