matlab vs python

参考)从下图可以清晰看到matlab和python之间的区别

Python是一种编程语言,但与其他变成语言的不同在于:python具有许多的扩展库(通过import引入)

Matlab是集合计算环境和变成语言的商业软件,Matlab的概念不仅包含了整个matlab包,还包含了它的编译运行环境,它具有的通用的库并不如其他语言那样多,但却具有强大的矩阵处理能力,以及绘图能力下面给出二者的优点Matlab:

  • It has a solid amount of functions.
  • Simulink is a product for which there is no good alternative yet.
  • It might be easier for beginners, because the package includes all you need, while in Python you need to install extra packages and an IDE. (Pyzo tries to solve this issue.)
  • It has a large scientific community; it is used on many universities (although few companies have the money to buy a license).

Python

  • Free. As in speech and as in beer. (It won’t cost you a thing, and you are allowed to view and modify the source.)
  • Beautiful programming language. Python was created to be a generic language that is easy to read, while Matlab started as a matrix manipulation package to which they added a programming language. As you become more familiar with Python, you will be amazed with how well it is designed. There is only one word for that: Beautiful.
  • Powerful. Because it’s so well designed, it’s easier than other languages to transform your ideas into code. Further, Python comes with extensive standard libraries, and has a powerful datatypes such as lists, sets and dictionaries. These really help to organize your data.
  • Namespaces. Matlab supports namespaces for the functions that you write, but the core of Matlab is without namespaces; every function is defined in the global namespace. Python works with modules, which you need to import if you want to use them. (For example from skimage import morphology.) Therefore Python starts up in under a second. Using namespaces gives structure to a program and keeps it clean and clear. In Python everything is an object, so each object has a namespace itself. This is one of the reasons Python is so good at introspection.
  • Introspection. This is what follows from the object oriented nature of Python. Because a program has a clear structure, introspection is easy. Private variables only exist by convention, so you can access any part of the application, including some of Python’s internals. Of course, in good programming practice you would not use private variables of other classes, but it’s great for debugging!
  • String manipulation. This is incredibly easy in Python. What about this line of code which returns a right justified line of 30 characters: "I code in Matlab".replace('Matlab','Python').rjust(30)
  • Portability. Because Python is for free, your code can run everywhere. Further, it works on Windows, Linux, and OS X.
  • Class and function definitions. Functions and classes can be defined anywhere. In one file (whether it is a module or a script) you can design as many functions and classes as you like. You can even define one in the command shell if you really want to ...
  • Great GUI toolkits. With Python you can create a front-end for your application that looks good and works well. You can chose any of the major GUI toolkits like Wx or Qt. Pyzo comes with PySide (a wrapper for Qt).

 

 

posted @ 2016-03-25 09:29  纸鸢spring  阅读(1007)  评论(0编辑  收藏  举报