参考)从下图可以清晰看到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).

matlab vs python的更多相关文章

  1. 【算法导论】八皇后问题的算法实现(C、MATLAB、Python版)

    八皇后问题是一道经典的回溯问题.问题描述如下:皇后可以在横.竖.斜线上不限步数地吃掉其他棋子.如何将8个皇后放在棋盘上(有8*8个方格),使它们谁也不能被吃掉?         看到这个问题,最容易想 ...

  2. matlab转python

    最近在做把matlab代码转成python代码,没有用过matlab,python也只是局限于爬虫,所以.... matlab与python最大的不同是,matlab的下标是从1开始的,python和 ...

  3. Matlab和Python用于深度学习应用研究哪个好?

    Matlab和Python都有一些关于深度学习的开源的解决方案(caffe\DeepMind\TensorFlow),基于哪个开展应用研究好?

  4. 选择、循环与函数结构:MATLAB VS Python

    选择.循环与函数结构:MATLAB VS Python 整理基本的程序控制结构,主要是选择 和 循环. 1.MATLAB选择结构 (1)单分支if语句格式: if 条件 语句组 end (2)双分支i ...

  5. 切片操作:MATLAB VS Python

    切片操作:MATLAB VS Python 一.MATLAB 矩阵的拆分 1.冒号表达式: t = e1:e2:e3 e1表示初始值,e2为步长,e3为终止值(包括e3),产生一个从e1到e3,步长为 ...

  6. matlab 调用 python

    众所周知,Python凭借其众多的第三方模块,近年来被数据分析.机器学习.深度学习等爱好者所喜爱,最主要的是Python还是开源的.另一方面,MATLAB因其在仿真方面的独特优势也被众多人追捧.而在国 ...

  7. matlab与python scipy.signal中 freqs freqz 中w,什么时候是角频率,什么时候是真实的工程中使用的采样频率Hz,如何转化

    matlab与python scipy.signal中的freqs,freqz频率分析函数,输出的w,有时候是角频率,有时候是真实频率,容易搞混,这里对比一下. 0.  精要总结: 1) freqs: ...

  8. Matlab 调用 Python 脚本

    Matlab 调用 Python 脚本 最近尝试在 Matlab 环境中调用 Python 脚本,这里总结下碰到的几个问题. 1. Python 模块加载 在 Matlab 函数中,想要将 Pytho ...

  9. ubuntu14.04下安装cudnn5.1.3,opencv3.0,编译caffe及配置matlab和python接口过程记录

    已有条件: ubuntu14.04+cuda7.5+anaconda2(即python2.7)+matlabR2014a 上述已经装好了,开始搭建caffe环境. 1. 装cudnn5.1.3,参照: ...

随机推荐

  1. 听说alphago又要挑战sc2了?——我眼中的人工智能

    乱谈: 之前alphago进行的围棋比赛相当火爆. 一时间我的朋友圈都爆了,因为同学以及相关专业的同学都在发这个,毕竟逼格一下就起来了,我也大肆转发.各种角度,不同层次的不同深度的文章也都扫了几眼. ...

  2. [转]为什么python标准库没有实现链表

    实际上刚开始学习一些高级语言的时候我也有同样的疑问,而且即使有链表对应物的语言,链表常常也很少被实际使用.如果是在国外听数据结构的课,老师一般会警告你这只是一个理论概念,实际应用应该实际考察,在通常情 ...

  3. Scala语言专题

    Scala基础01:基础语法 Scala基础02:函数,懒值,异常 Scala基础03:数组 Scala基础04:类与对象 Scala基础05:包与引用 Scala基础06:继承 Scala基础07: ...

  4. Oracle报错:ORA-01747: user.table.column, table.column 或列说明无效

    1.检查sql书写正确性 2.如果sql书写正确,则是由于数据库列名起的不好引起的,名字用到了数据库的关键字. 如果列很多,又不好确定是哪个列名使用了关键字,以下建议可供参考: 我用以下方法定位 se ...

  5. N_F1_APPROVE

    package nc.bs.pub.action; import java.util.ArrayList; import java.util.Hashtable; import java.util.L ...

  6. JavaWeb_数据传输_原

    本节目录: 1.如何从Servlet向JSP传送数据:(setAtrribute和getAtrribute)  2.jsp如何输入表达数据以及传数据到servlet(FormAction去向和Inpu ...

  7. window的画图工具(mspaint)也可以帮助我们开发和调试代码的.

    经常在视频中看到老师使用画图板来给学生讲解概念. 久而久之,发现私下里,开发程序调试程序时也可以使用画图板来辅助开发. 新建一个"无标题"的画图板 -> 把将要区分的问题扔进 ...

  8. Arithmetic Expression

    时间限制:2000ms 单点时限:200ms 内存限制:256MB 描述 Given N arithmetic expressions, can you tell whose result is cl ...

  9. win/linux 下使用 psutil 获取进程 CPU / memory / IO 占用信息

    psutil - A cross-platform process and system utilities module for Python 1. 安装 pip 安装即可. windows 下需要 ...

  10. OpenJudge/Poj 1163 The Triangle

    1.链接地址: http://bailian.openjudge.cn/practice/1163 http://poj.org/problem?id=1163 2.题目: 总时间限制: 1000ms ...