【问题标题】:System command from Matlab shell (Mac OS)来自 Matlab shell (Mac OS) 的系统命令
【发布时间】:2014-07-19 10:06:00
【问题描述】:

我需要从 matlab 脚本调用 gmt 命令。在标准的 Mac OS shell 中,我配置了所有路径并且 gmt 工作正常。当我启动matlab时,结果如下:

>> !gmt

/bin/bash: gmt: command not found

当我添加路径时:

>> setenv('PATH', [getenv('PATH') ':' '/Applications/GMT-5.1.1.app/Contents/Resources/lib/']);

问题更改为:

>> !gmt

dyld: Library not loaded: @executable_path/../lib/libnetcdf.7.dylib
  Referenced from: /Applications/GMT-5.1.1.app/Contents/Resources/bin/gmt
  Reason: Incompatible library version: gmt requires version 10.0.0 or later, but libnetcdf.7.dylib provides version 9.0.0

gmt: Trace/breakpoint trap

我不知道从这里去哪里。

在 Windows 上这很好用,但我更喜欢在 mac 上工作。

【问题讨论】:

  • 该命令的 Windows 版本也适用于 Ubuntu Matlab!谢谢:)

标签: macos matlab shell gmt


【解决方案1】:

好的,解决了:

setenv('DYLD_LIBRARY_PATH', '/usr/local/bin/');

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-03
    • 1970-01-01
    • 2017-12-02
    • 2017-12-24
    • 1970-01-01
    相关资源
    最近更新 更多