engOpen fails on Mac with "matlab: command not found"
Afficher commentaires plus anciens
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?
Réponses (2)
David Chassin
le 2 Juil 2012
1 vote
Walter Roberson
le 2 Juil 2012
0 votes
Odd, in OS-X (Leopard), I find /bin/expr and /usr/bin/awk .
Is your C++ program possibly fiddling with your PATH environment variable?
Catégories
En savoir plus sur Call MATLAB from C dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!