replacing Matlab with python

前端 未结 8 1590
小蘑菇
小蘑菇 2020-12-23 12:30

i am a engineering student and i have to do a lot of numerical processing, plots, simulations etc. The tool that i use currently is Matlab. I use it in my university compute

相关标签:
8条回答
  • 2020-12-23 13:15

    On a Mac the easiest ways to get started are (in no particular order):

    • Enthought Python Distribution which includes most scientific packages you are likely to need. Free for academic/non-commercial use.
    • Macports - up to date with latest releases, so sudo port install py26-numpy py26-scipy py26-matplotlib py26-ipython should get you started.
    • Scipy Superpack - script to install recent svn versions of all the important packages.

    I've done exactly this (replace Matlab with Python) about 2 years ago and haven't looked back. The broadcasting in Python, more intuitive memory model and other Numpy advantages make numerical work a complete pleasure. Plus with f2py, cython it is incredibly easy to put inner loops in another language. This is a good place to start - other impressive pages to provide motiviation are PerformancePython and ParallelProgramming. Be sure to understand Pythons "variable is a reference to an object" semantics... after that adjustment everything is plain sailing. One of the coolest things that beats matlab is in 2 lines I run over 8 cores... p = Pool(8); res = p.map(analysis_function,list_of_data) - MATLAB parallels toolboxes are so expensive I've yet to see a University that actually has them.

    0 讨论(0)
  • 2020-12-23 13:16

    Duplicate of this.

    My sense is that for pure numerical/linear algebra computations and visualization Matlab is a slightly more consistent development environment. Numpy/Scipy/Matplotlib feel, to me, a bit haphazard. If you are building a full program -- to automate a system or display results on a webpage -- Python the advantage of being a real programming language first and foremost. But for interactive numerical processing I think Matlab still wins. The lack of element wise infix operators in Python is one small example (PEP 225). For statistical computing, data exploration and visualization, it is hard to beat R.

    0 讨论(0)
提交回复
热议问题