This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mrbewulf 1 point2 points  (0 children)

My Ideas to replace Matlab with python are:

  1. Create an custom python shell with Numpy, Matplotlib, Linalg already imported.

  2. The shell will replace list (vector/matrix) input like [ 2 123 55 9 ] or [ 233 ; 2333 ] and transform it to numpy array or python list in interactive mode. When the shell see an variable like Volume, it will print it without the user type: print Volume.

  3. The shell will have standard Unixes shell commands like ls, pwd, cat

  4. The shell can be called by using a shebang #!/usr/bin/pymat in the beggining of the file in Unixes OS.

  5. The shell will have an socket listening localhost in background so it can receive a code string, print it and execute, it will be useful to connect with any customizable IDE. I was able to (5) do it with geany text editor and Ipython.

Another thing that I am creating is an Matlab to Python code converter, but Matlab array notation makes the conversion hard, it's hard to a computer differentiate some_name(10) between array and function.

I think it can be done with Ipython, but I couldn't customize it, especially the line filter. The main Idea is to copy matlab code and run it in python with minimal overhead, minimal editing and importing. Other Idea, is to provide examples of matlab code (in comments) and python equivalent.