Matlab之后学习任何编程语言的建议

发布于 2024-09-08 05:03:42 字数 496 浏览 3 评论 0原文

我在本科一年级时选修了 C++ 课程。然而,一旦结束,我就再也没有在任何项目或用途中使用过它。在“链接列表”开始之前,我熟悉 C++ 中的一些普通主题。当我大二后有机会做我的第一个项目时,我的教授就建议了我。学习在数学和工程项目中广泛使用的Matlab。但我经常听到人们说 Matlab 不是一种语言,它不能取代任何编程语言,如 C++、Java、Fortran 等。我还担心它无法像 Fortran、C++ 等那样使用可执行文件运行我

想学习一种编程语言:

1)它可以解决Matlab 在许多方面缺乏的上述问题和其他问题。

2)在工业和研究中心广泛使用和可用。

3)编码相对简单快捷,而且功能强大。

另请:

1)给出您建议的语言的优点和缺点(相对于 Matlab)。

2)最好的学习方法。

3)知道我熟悉编程概念后,要学习的主题的正确顺序。

4) 一个简单、好的、有趣的来源,可供学习。

感谢您的建议。

I've taken a course in C++ in my freshman year in undergrad. However once it was over I never employed it in any project or use. I am familiar with some average topics in C++ prior to where 'link list' starts. Once I got the opportunity to do my first project after Sophomore year, I was suggested by my prof. to learn Matlab which is widely used in mathematical and engineering projects. But I often hear from people that Matlab is not a language and that it can't take the place of any programming languages like C++, Java, Fortran etc. I am also concerned about its inability to run using executable files unlike Fortran, C++ etc.

I am wanting to learn a programming language:

1) Which takes care of the above, and other, issues which Matlab lacks in many aspects.

2) Which is widely used and available in industry and research centers.

3) Which is relatively easy and quick to code, and powerful in its capabilities.

Also please:

1) Give the advantages and disadvantages (over Matlab) for the language you suggest.

2) The best way to learn it.

3) The proper sequence of topics to learn knowing that I am familiar with the programming concepts.

4) A source, which is easy, good and interesting, to learn from.

Thanks for your suggestions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

很酷不放纵 2024-09-15 05:03:42

从 matlab 开始,我会转向 python。

首先,我想澄清一个神话。 Matlab用于工业领域。然而,它并不常见,而且非常具体。它通常用于原型设计和证明数学分析,而不是向客户部署系统。一旦聪明的数学家在 Matlab 中证明了他们的想法,开发人员就需要用它构建一个真正的系统。真实的系统通常是用 C、C++、Java 完成并部署给客户的。

但是,首先,问问自己为什么想要学习这门语言。

  • 难道只是为了曝光?想了解更多编程知识?几乎任何语言都能让你做到这一点。
  • 您希望能够快速启动一些脚本吗? Python 会更好。
  • 您是否想开发大规模系统,以牺牲开发速度为代价,充分利用每一盎司的处理能力? C/C++/Java 将是更好的路径。
  • 您想对招聘人员更具吸引力吗? Java 的“旺旺广告”数量可能最多,其次是 C++,然后可能是 Python 或 C#。
  • 您想留在特定行业(例如科学计算)吗?挑选一些您感兴趣的公司,看看他们内部使用什么。

请记住,语言本身并不是真正的目标,它只是帮助您到达目的地的工具! :)

1) 它解决了 Matlab 在许多方面缺乏的上述和其他问题。

是的,Python 是一种业界可接受的编程语言,具有许多出色的编程功能 - 列表理解、鸭子类型、强大的标准库。

2) 在工业和研究中心广泛使用和可用。

它的使用相当广泛,并且正在不断增长。特别是对于研究和原型设计。超大型系统仍主要使用 Java 或 C++,但这些语言更难学习。

3) 编码相对简单、快速,而且功能强大。

简而言之,这就是Python。

和:

1) 给出您建议的语言(相对于 Matlab)的优点和缺点。

Matlab 有一些非常酷的功能,但作为一种行业编程语言,我不会称其为顶级功能。然而,语法可能最接近 python。 Python 可以为您提供真正的面向对象开发,并且拥有更丰富的标准库,可以超越 matlab 的限制。

2)学习它的最佳方法。

教程开始,然后继续编写小型项目。从那里向上移动。通过实践来学习。

我最近开始通过在 http://projecteuler.net 上解决问题来学习 Scala(只是因为),它是很有趣! (对于乐趣的极其书呆子的定义)

3) 了解我熟悉编程概念后,学习主题的正确顺序。

阅读代码,阅读 StackOverflow 上的问题。阅读有关编程概念的博客和书籍 - 如何构建代码、如何重构、如何设计等。然后,解决您遇到的问题。如果可以的话,找一位导师或者问很多关于SO的问题。

4) 一个简单、良好且有趣的来源,可供学习。

堆栈溢出。一位导师,如果你有一位导师的话。开源也不错。

From matlab, I would go to python.

First, I want to dispel of a myth. Matlab is used in industry. However, it isn't as common, and is pretty specific. It's often used for prototyping and proving mathematic analysis, not to deploy systems to customers. Once the smart mathematicians prove their ideas out in Matlab, it falls to developers to build a real system out of it. That real system is usually done in C,C++,Java and deployed to the customer.

But, first, ask yourself why you want to learn this language.

  • Is it just to get exposure? To learn more about programming? Almost any language will get you that.
  • Do you want to be able to quickly fire off some scripts? Python would be better.
  • Do you want to develop large scale systems that leverage every ounce of processing power at the expense of development speed? C/C++/Java would be a better path.
  • Do you want to become more attractive to recruiters? Java probably has the highest amount of "want-ads", followed by C++, then maybe Python or C#.
  • Do you want to remain in a specific industry (e.g. scientific computing)? Pick out a few companies that interest you and find out what they use in-house.

Remember, the language is not really a goal in itself, it's just a tool to get you where you're going! :)

1) Which takes care of the above, and other, issues which Matlab lacks in many aspects.

Yes, Python is an industry acceptable programming language with many great programming features - list comprehensions, duck typing, a strong standard library.

2) Which is widely used and available in industry and research centers.

It is fairly widely used, and growing. Especially for research and prototyping. Very large scale systems will still mostly be in Java or C++, but those are harder languages to learn.

3) Which is relatively easy and quick to code, and powerful in its capabilities.

This is python in a nutshell.

And:

1) Give the advantages and disadvantages (over Matlab) for the language you suggest.

Matlab has some really cool features, but as an industry programming language, I wouldn't call it top of the line. However, the syntax is probably closest to python. Python can give you true object oriented development, and has a much richer standard library to go beyond matlabs walls.

2) The best way to learn it.

Start with a tutorial and move on to coding small projects. Move up from there. Learn by doing.

I've recently taken to learning Scala (just 'cuz) by doing problems at http://projecteuler.net, and it's been fun! (for an extremely nerdy definition of fun)

3) The proper sequence of topics to learn knowing that I am familiar with the programming concepts.

Read code, read questions on StackOverflow. Read blogs and books about programming concepts - how to structure code, how to refactor, how to design, etc. Then, just solve problems you encounter. If you can, find a mentor or ask a lot of questions on SO.

4) A source, which is easy, good and interesting, to learn from.

StackOverflow. A mentor, if you have one accessible. Open source is good too.

鲸落 2024-09-15 05:03:42

我经常听人说 Matlab 不是一门语言

你听到的是废话。Matlab 是一种非常好的语言,尽管对于那些习惯于 FORTRAN、C 或 C++ 的人来说有点陌生。此外,它还广泛应用于工程和许多自然科学中。你的问题如所陈述的没有给出没有充分的理由说明为什么你应该继续做其他事情,除了那些听起来像是有野心的人模糊的反对意​​见。

我强烈建议您继续使用 Matlab,直到它不再对您有效。那时,您将遇到一个特定问题(规模、并行性、性能等),人们希望它也能代表您将来会遇到的问题。此时学习一门新语言会比猜测哪种语言可以帮助您解决将来可能遇到的未知问题要好得多。


PS 有很多关于将 Matlab 编译为包含本机机器代码的可执行二进制文件的论文。我不知道这个作品是否已经流行起来了。

I often hear from people that Matlab is not a language

You're hearing nonsense. Matlab is a perfectly good language, if a bit strange to people who've been conditioned by FORTRAN, C, or C++. Also, it is heavily used in engineering and in many of the natural sciences. Your question as stated gives no good reason why you should go on to something else except the nebulous objections of people who sound like they have axes to grind.

I strongly recommend that you continue using Matlab until it stops being effective for you. At that point you will have a particular problem (scale, parallelism, performance, whatever) which one hopes will also be representative of problems you will encounter in the future. You'll be much better off learning a new language at that point than you will guessing what language might help you with unknown problems you might encounter in the future.


P.S. There have been a number of papers on compiling Matlab to executable binaries containing native machine code. I don't know if this work has made it out into the wild yet.

挽容 2024-09-15 05:03:42

Python。

语法与 Matlab 比较相似(不完全一样,但相当容易习惯)。
您还拥有 matplotlib python 库,它提供了 Matlab 的一些功能,同时尝试提供相同的 API(即函数名称等)。这可能是您开始使用 Python 的起点,同时保持在熟悉的基础上。

要学习 Python,我推荐 官方 Python 教程 - IMO 对于初学者来说非常好。

Python.

The syntax is relatively similar to Matlab (not exactly, but fairly easy to get used to).
You also have the matplotlib python library, which gives some of Matlab's functionality while trying to provide the same API (i.e. function names etc.). This could be a starting point for you to start using Python, while staying in a familiar ground.

To learn Python, I'd recommend the Official Python Tutorial - which IMO is quite good for beginners.

终弃我 2024-09-15 05:03:42

Matlab 在科学和工程计算工业中应用极为广泛。它当然有其缺点,但它为算法的快速开发提供了良好的平台。我在石油行业与一组研究地球物理学家一起工作;他们都一直使用 Matlab,开发计算电磁代码。国防、汽车工业、越来越多的生物科学以及许多其他领域都是 Matlab 的大量用户。查看招聘广告。

因此,如果您唯一关心的是找到一份工作,我建议您的下一种编程语言应该是 Matlab——它至少满足您 3 个需求中的 2 个。我怀疑您对 Matlab 缺陷的理解部分是基于您对该产品缺乏深入的了解。

说了这么多,你想学习另一种编程语言是为了什么?如果您想继续开发 sci/tech/eng 程序,那么 Fortran 是一个不错的选择,C 和 C++ 也是如此。我将让其他人支持 C 和 C++,因为我们使用 Fortran 来完成这里的繁重工作。

Fortran 相对于 Matlab 的主要优势是执行速度;我工作的地方非常重要,我们的一些计算需要在数百个处理器上花费几天的时间。这表明了 Fortran 的另一个优势,即 Fortran 通过 OpenMP 和 MPI(以及类似的)成为最容易并行化的语言之一。

要学习现代 Fortran,我建议您阅读 Ellis 等人编写的《Fortran 90》一书和 Metcalf 编写的《Fortran 95/2003 Expanded》一书。然后,根据您的情况,我会开始将一些 Matlab 程序翻译成 Fortran。这将使您很好地了解两种语言的相对优点和缺点。您的 Matlab 程序还为您的 Fortran 程序要执行的操作提供了良好的规范,因此您已经编写了测试。

Matlab is extremely widely used in industry for scientific and engineering computing. It has its faults, certainly, but it provides a good platform for rapid development of algorithms. I work in the oil industry with a team of research geophysicists; they all use Matlab all the time, developing computational electromagnetic codes. Defence, the car industry, increasingly the biosciences, and many others are heavy users of Matlab. Check out the job ads.

So if your sole concern is getting a job, I suggest that your next programming language should be Matlab -- it hits at least 2 of your 3 desiderata. I suspect that your understanding of Matlab's deficiencies is, in part, based on your lack of in depth knowledge of the product.

Having said all that, what do you want to learn another programming language for ? If you want to continue to develop sci/tech/eng programs then Fortran is a good choice, as too are C and C++. I'll leave others to support C and C++, since we use Fortran for the heavy lifting here.

The main advantage that Fortran has over Matlab is speed of execution; where I work that matters a lot, some of our computations take days on 100s of processors. Which indicates another advantage that Fortran has, which is that Fortran, through OpenMP and MPI (and similar) is one of the most easily parallelised languages around.

To learn modern Fortran, I suggest the book 'Fortran 90' by Ellis et al, and the book 'Fortran 95/2003 Explained' by Metcalf. Then, in your situation, I'd start translating some of my Matlab programs into Fortran. This will give you a good appreciation of the relative strengths and weaknesses of the two languages. Your Matlab programs also provide a good specification for what your Fortran programs are to do, so you have the tests already written.

绾颜 2024-09-15 05:03:42

Matlab 广泛应用于工业领域,尤其是研发部门。当然,在软件公司中,如果客户与 Matlab 无关,你就不会出售 Matlab 脚本。

我会选择 Java:

1)平台独立,易于使用。正如你所说,Matlab 是一种存在于软件中的脚本语言,因此任何语言相对于 Matlab 的优势都应该是显而易见的。 (如果您正在考虑工程/模拟领域之外的应用程序)。

2)使用语言和程序!

3)做一个小项目并开始研究它。最好的学习方法就是实践。

4)说实话,买一本好书并使用谷歌。最后,这就是我会做的,即使人们可以一页又一页地谈论理论上最好的方法。

亲切的问候,

Well Matlab is widely used in industry to do simulations and especially in R&D departments. Of course in a software company, you're not going to sell Matlab scripts if the client has nothing to do with Matlab.

I would go for Java:

1) Platform independant, easy to use. As you said, Matlab is a scripting language living in a software, so the advantages of any language over Matlab should be obvious. (If you're thinking about applications outside of the engineering / simulation world).

2) Use the language and program!

3) Take a little project and start working on it. The best way to learn is by doing it.

4) To be honest, buy a good book and use Google. In the end, that's what I would do even though one could go and talk pages and pages about what is in theory the best way of doing it.

Kind Regards,

快乐很简单 2024-09-15 05:03:42

我经常听人说 Matlab 不是一门语言

如果是这样的话,那么你周围的人往往是错的。 Matlab 是一种真正的编程语言。它永远不会取代 C++ 或 Java,因为它们用于不同的事情。但 Matlab 能够很好地完成其设计任务。

当我获得物理学学位时,我主要使用 Matlab 进行计算。现在我主要使用 C# 和 ASP.Net 进行基于 Web 的开发。但也许我的转变是非典型的。

我的建议是:找到您想要工作的行业,查看职位列表,看看他们要求什么语言。然后学习其中之一。根据我的经验,学习足够的知识来获得入门级职位并不难,然后你会在工作过程中学到更多东西。

I often hear from people that Matlab is not a language

If that's the case, then the people around you are often wrong. Matlab is a real programming language. It's never going to replace C++ or Java because they're used for different things. But Matlab works quite well for the kind of work it's designed to do.

I mostly used Matlab for calculations when I was getting my degree in physics. Now I do web-based development mostly using C# and ASP.Net. But perhaps my transition is atypical.

My recommendation is this: Find an industry you want to work for, look at the job listings, and see what languages they ask for. Then learn one of those. In my experience it's not too hard to learn enough to land an entry-level position, and then you'll learn a lot more during the course of your employment.

我三岁 2024-09-15 05:03:42

这里又投票给了 python,来自 Matlab 和 Python 的重度用户。目前还没有人提到的是,这两种语言可以很好地协同工作,并且具有兼容的优势。

我经常使用 python 脚本来预处理将输入到 Matlab 的数据(在我看来,python 解析函数比 Matlab 的解析函数更容易使用)。或者我将使用 python 来模拟一个过程(因为我们的生产系统是用 C++ 和 python 编写的),并使用 Matlab 的绘图和分析功能来处理可视化显示或统计分析。

另外,正如 Stephen 提到的,在业界,Matlab 经常用于原型阶段。然后这些概念被翻译成另一种语言;在我的公司,另一种语言是 python,从一种语言到另一种语言的翻译通常非常简单。

Python 也是一种很好的通用脚本语言,用于命令行自动化、文件管理等...(想想 bash 的替代品),因此它是一种很好的语言,适合放在工具箱中。

Another vote for python here, from a heavy user of both Matlab and Python. Something that no one mentioned yet is that both languages play very well together, and have compatible strengths.

I'll often use python scripts to pre-process data that will be fed to Matlab (python parsing functions are much more pleasant to work with than Matlab's, in my opinion). Or I'll use python to simulate a process (since our production system is in C++ and python), and use the graphing and analysis power of Matlab to handle the visual display or the statistical analysis.

Also, as Stephen mentioned, in the industry, Matlab is often used in the prototype stage. The concepts are then translated to another languages; in my company, that other language is python, and translation from one to the other is generally very straightforward.

Python is also a good all purpose scripting language for command line automation, file management, etc... (think bash replacement), so it's a good language to have in one's toolbox.

甜点 2024-09-15 05:03:42

我在这里将 JavaScript 纳入其中纯粹是因为它是世界上安装最广泛的语言。它在非浏览器安装中势头强劲。我预测未来几年高质量的 JS 程序员将会非常短缺。

Ill just throw JavaScript into the mix here purely because it's the most widely installed language in the world. Its gaining momentum in non browser installations. I predict there will be a real shortage of quality JS programmers in the next few years.

吾家有女初长成 2024-09-15 05:03:42

我个人推荐Java。

高级:
1)与C++相比更容易学习
2) 功能强大且最新,有很多库可供使用,功能范围广泛
3)成熟稳定,适合研究
4)有很好的记录
缺点:
1)不是周围最快的孩子

学习它的最佳方法:
:阅读一本书,并用它进行编程,也许重写您现有的项目之一

知道我熟悉编程概念,学习主题的正确顺序:
: 再次获得一本好书。它应该都在那里。

一个简单、好、有趣的来源,可供学习:
: 再次获得一本好书。以及 Google 和 Java 的官方网站

您可以开始另一个问题,为初学者提供一本好的 Java 书籍。我相信你会得到很多好的答案

I would personally recommend Java.

Adv:
1) Easier to learn compared with C++
2) Powerful and up-to-date, with a lot of libraries to use and wide range of functionalities
3) It is mature and stable, suitable for research
4) very well documented
disadv:
1) not the fastest kids around

The best way to learn it:
: read a book, and program with it, maybe rewrite one of your existing project

The proper sequence of topics to learn knowing that I am familiar with the programming concepts:
: again get a good book. it should be all there.

A source, which is easy, good and interesting, to learn from:
: again get a good book. and Google and Java's official website

You could start another question for good Java book for beginners. I am sure you will get a lot of good answers

无戏配角 2024-09-15 05:03:42

一个简单、优秀且有趣的资源,可供学习。

如果您选择 Python,深入了解 Python 是一个很好的资源。许多示例都具有实用性,您可以获取该书的免费电子版。

A source, which is easy, good and interesting, to learn from.

If you choose Python, Dive into Python is a good source. Many of the examples have a practical flavor, and you can get a free electronic copy of the book.

稚然 2024-09-15 05:03:42

您应该学习的语言取决于您的研究内容。如果您正在进行大量数值工作,那么 MATLAB、R 和 Python 是三种明显的工作语言。Python

在答案中被多次提及,因此我将快速介绍一下 R。 R 是免费的开源软件,事实上 用于统计和数据分析的语言。它还拥有(恕我直言)最好的数据可视工具。

您的另一个选择是学习网络编程,因为能够通过网络应用程序与他人分享您的研究非常有用。尝试一些基本的 HTML 编码,然后研究 jQuery 等 JavaScript 框架。

如果您不是软件开发人员,请忘记 Fortran 等编译语言和 C 变体 (C++/C#/Java)。你不需要它们。

在学习编程方面,Software Carpentry 几乎总是值得一看的。

The language that you should learn depends on what your research entails. If you are doing lots of numerical work, then MATLAB, R and Python are the three obvious languages to work in.

Python has been mentioned a lot in the answers, so I'll just quickly touch upon R. R is free, open source software that is the de facto language for statistics and data analysis. It also has (imho) the best data-vis tools around.

You other option is to learn web-programming, since it is very useful to be able to share your research with others via a web app. Try some basic HTML coding, then look into a JavaScript framework like jQuery.

If you aren't a software dev, then forget compiled languages like Fortran and the C variants (C++/C#/Java). You won't need them.

In terms of learning to program, it's almost always worthwhile taking a look at Software Carpentry.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文