How to use a command for the terminal which isn't a standard one?
33 次查看(过去 30 天)
显示 更早的评论
I have to use this line of code which is supposed to generate the image of a graph using GraphViz (which is installed correctly as using the same line on the terminal works):
system('dot -Tpng graph.gv -o Graph.png');
but i get the error:
zsh:1: command not found: dot
Is there a way to make it work without using the GraphVIz add on?
0 个评论
采纳的回答
MJFcoNaN
2022-12-18
Hello,
'system' starts a new shell process which may not inherit your familiar environment.
I suggest you check the PATH in matlab by
getenv('PATH')
and then try to add some needed paths by setenv, such as
setenv("PATH", [getenv("PATH") ":" "where_is_the_dot_command"]);
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Directed Graphs 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!