【问题标题】:Google Colab: Problem with using smop to convert a MATLAB code to PythonGoogle Colab:使用 smop 将 MATLAB 代码转换为 Python 的问题
【发布时间】:2023-02-12 07:26:07
【问题描述】:

我正在尝试在 google Colab 中将 MATLAB 文件转换为 Python。但是我得到一个语法错误。我做了以下步骤:

  1. 我安装了“smop”包(pip install smop);
  2. 我将 .m 文件 (MATLAB) 的副本放在与 Google Drive 中的 Colab 文件相同的文件夹中;
  3. 我运行了 smop 命令smop LoadChooseCoverage.m

    有人可以帮我弄这个吗?

【问题讨论】:

  • smop 需要在命令行运行,而不是像您尝试的那样在 Python 代码中运行。因此,在您自己的计算机上运行smop将脚本转换为 Python,然后将 Python 发送到 Colab。

标签: python matlab google-colaboratory


【解决方案1】:

我也在尝试使用 smop。您是否已经执行了以下操作?

git clone https://github.com/victorlei/smop
cd /smop
vim ./INSTALL

我已经安装了它,但它目前不适合我,如果我能正常工作,我会更新。关于这方面的任何更新?

【讨论】:

    猜你喜欢
    • 2018-09-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-05
    • 2011-12-07
    相关资源
    最近更新 更多