MATLAB 有什么用?为什么它被大学如此使用?什么时候比 Python 好? [英] What is MATLAB good for? Why is it so used by universities? When is it better than Python?

查看:25
本文介绍了MATLAB 有什么用?为什么它被大学如此使用?什么时候比 Python 好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近有人要求我为一堂课学习一些 MATLAB 基础知识.

I've been recently asked to learn some MATLAB basics for a class.

是什么让研究人员和在大学工作的人如此酷?我发现使用矩阵和绘制事物很酷......(使用某些库可以在 Python 中轻松完成这些事情).

What does make it so cool for researchers and people that works in university? I saw it's cool to work with matrices and plotting things... (things that can be done easily in Python using some libraries).

编写函数或解析文件很痛苦.我还处于起步阶段,我错过了什么?

Writing a function or parsing a file is just painful. I'm still at the start, what am I missing?

在真实"世界中,我应该考虑将它用于什么?它什么时候可以比 Python 做得更好?为了更好,我的意思是:写一些表演的简单方法.

In the "real" world, what should I think to use it for? When should it can do better than Python? For better I mean: easy way to write something performing.

更新 1:我最想知道的一件事是我是否遗漏了什么?":D

UPDATE 1: One of the things I'd like to know the most is "Am I missing something?" :D

更新 2:感谢您的回答.我的问题不是买还是不买 MATLAB.大学有可能在不破坏许可证的情况下免费给我一份旧版 MATLAB(我猜是 MATLAB 5)的副本.我对它的功能很感兴趣,如果它值得深入研究(除了基本 MATLAB,我不需要任何东西就能通过考试:P)它真的比 Python 更好现实世界中的特定任务.

UPDATE 2: Thank you for your answers. My question is not about buy or not to buy MATLAB. The university has the possibility to give me a copy of an old version of MATLAB (MATLAB 5 I guess) for free, without breaking the license. I'm interested in its capabilities and if it deserves a deeper study (I won't need anything more than basic MATLAB in oder to pass the exam :P ) it will really be better than Python for a specific kind of task in the real world.

推荐答案

Adam 只是部分正确.许多(如果不是大多数)数学家永远不会接触它.如果有使用过的计算机工具,它将类似于 MathematicaMaple.另一方面,工程部门经常依赖它,对于一些应用数学家来说肯定有一些有用的东西.它也在某些领域的工业中大量使用.

Adam is only partially right. Many, if not most, mathematicians will never touch it. If there is a computer tool used at all, it's going to be something like Mathematica or Maple. Engineering departments, on the other hand, often rely on it and there are definitely useful things for some applied mathematicians. It's also used heavily in industry in some areas.

关于 MATLAB,您必须意识到的是,它最初是作为 Fortran 库的包装器开始的对于线性代数.很长一段时间,它的态度是整个世界都是一组双打(花车)".作为一种语言,它的发展非常有机,如果将其视为一种编程语言,它也存在一些非常明显的缺陷.

Something you have to realize about MATLAB is that it started off as a wrapper on Fortran libraries for linear algebra. For a long time, it had an attitude that "all the world is an array of doubles (floats)". As a language, it has grown very organically, and there are some flaws that are very much baked in, if you look at it just as a programming language.

但是,如果您将其视为进行某些类型研究的环境,它具有一些真正的优势.它与进行浮点线性代数一样好.符号简单而强大,实现快速且值得信赖.它非常擅长生成情节和其他交互式任务.有大量工具箱",其中包含用于特定任务的良好代码,而且价格实惠.有一个庞大的用户社区共享数字代码(Python + NumPy 在同一个联盟中一无所有,至少现在)

However, if you look at it as an environment for doing certain types of research in, it has some real strengths. It's about as good as it gets for doing floating point linear algebra. The notation is simple and powerful, the implementation fast and trusted. It is very good at generating plots and other interactive tasks. There are a large number of `toolboxes' with good code for particular tasks, that are affordable. There is a large community of users that share numerical codes (Python + NumPy has nothing in the same league, at least yet)

Python,warts 和所有语言,是一种更好的编程语言(与许多其他语言一样).然而,它在工具方面落后了十年左右.

Python, warts and all, is a much better programming language (as are many others). However, it's a decade or so behind in terms of the tools.

关键是大多数使用 MATLAB 的人并不是真正的程序员,也不想成为程序员.

The key point is that the majority of people who use MATLAB are not programmers really, and don't want to be.

对于通用编程语言来说,这是一个糟糕的选择;它很古怪,对于许多任务来说很慢(你需要对事物进行矢量化以获得有效的代码),并且不容易与外部世界集成.另一方面,对于它擅长的东西,它是非常非常好的.很少有东西可以比较.有一家公司得到了合理的支持,谁知道投入了多少人年.这在行业中很重要.

It's a lousy choice for a general programming language; it's quirky, slow for many tasks (you need to vectorize things to get efficient codes), and not easy to integrate with the outside world. On the other hand, for the things it is good at, it is very very good. Very few things compare. There's a company with reasonable support and who knows how many man-years put into it. This can matter in industry.

严格查看 Python 与 MATLAB 的比较,它们大多是针对不同工作的不同工具.在它们确实有一些重叠的区域,很难说更好的路线是什么(很大程度上取决于您要做什么).但大多数情况下,Python 并不擅长 MATLAB 的核心优势,反之亦然.

Strictly looking at your Python vs. MATLAB comparison, they are mostly different tools for different jobs. In the areas where they do overlap a bit, it's hard to say what the better route to go is (depends a lot on what you're trying to do). But mostly Python isn't all that good at MATLAB's core strengths, and vice versa.

这篇关于MATLAB 有什么用?为什么它被大学如此使用?什么时候比 Python 好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆