45_matlab2py.ipynb 1.58 KB
Newer Older
paugier's avatar
paugier committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "# Port a Matlab code to Python\n",
    "\n",
    "⚠️ ⚠️ Difficult !! ⚠️ ⚠️\n",
    "\n",
    "### Converter (with runtime dependence)\n",
    "\n",
    "- [Smop](https://github.com/victorlei/smop), Small Matlab to Python compiler: convert Matlab code to Python code\n",
    "\n",
    "See https://stackoverflow.com/a/17535694\n",
    "\n",
    "### Other approach\n",
    "\n",
    "- fluidmat2py, provided by [fluiddyn](https://fluiddyn.readthedocs.io)\n",
    "\n",
    "```\n",
    "usage: fluidmat2py [-h] [-c] path\n",
    "\n",
    "Utility to produce a strange code which is no longer Matlab and not yet Python.\n",
    "\n",
    "positional arguments:\n",
    "  path         str indicating which file or directory has to be used.\n",
    "\n",
    "optional arguments:\n",
    "  -h, --help   show this help message and exit\n",
    "  -c, --clean  Only clean the Matlab code.\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}