Learning Matlab & Python for a DARPA Grant

  • Context: MATLAB 
  • Thread starter Thread starter DiracPool
  • Start date Start date
  • Tags Tags
    Matlab Python
Click For Summary

Discussion Overview

The discussion revolves around learning programming languages Matlab and Python in preparation for a Ph.D. project under a DARPA grant focused on autonomous rovers. Participants share resources, experiences, and advice on navigating the learning process, particularly for someone returning to programming after a long hiatus.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Homework-related

Main Points Raised

  • One participant expresses concern about needing to relearn programming after 30 years and seeks guidance on Matlab and Python, including version choices and learning resources.
  • Another participant recommends the book "Essential Matlab" and suggests using iPython with the notebook interface for Python, noting the differences between Python 2.7+ and Python 3.4+.
  • Some participants mention the existence of Matlab clones like Freemat and discuss their limitations compared to the official Matlab software.
  • There is a suggestion to check if the university has site licenses for Matlab to avoid personal costs for extensions.
  • One participant reassures another that prior programming experience can facilitate relearning, emphasizing that programming fundamentals remain consistent despite changes in syntax.
  • Resources such as O'Reilly books on Python and websites like rosettacode.org are mentioned as helpful for comparative language studies and specific tasks.

Areas of Agreement / Disagreement

Participants generally agree on the importance of learning both Matlab and Python, but there are varying opinions on the best versions to purchase and the necessity of toolboxes. The discussion remains unresolved regarding the best approach to learning and the specific tools needed for the project.

Contextual Notes

Participants express uncertainty about the specific requirements of the Ph.D. project and the functionality of different Matlab versions. There is also a lack of consensus on the best resources for learning programming effectively.

Who May Find This Useful

This discussion may be useful for individuals entering graduate programs in fields related to machine intelligence, robotics, or engineering, particularly those needing to refresh or learn programming skills in Matlab and Python.

DiracPool
Messages
1,254
Reaction score
514
I'd appreciate it if someone can give me a little guidance here. I'm slated to be entering a Ph.D. program in the fall where I'll be working on a machine intelligence project under a DARPA grant designed to create autonomous rovers. They want me because of my background in understanding the chaotic dynamics of cortico-cortical interactions in human and non-human brains and the manner in which these processes translate into motor routines expressing goal-directed behavior. The problem is that I'm a biologist, but in order to work on the project I'm slated for and to fulfill the core requirements for the Ph.D., I'm going to have to learn how to program again! I was one of the original computer whiz kids in the early 80's but I haven't written any code in 30 years. I have no idea how things have changed.

All they told me was that I was going to have to learn how to program in Matlab with a new interaction it has with Python. I don't think its a toolbox, I don't really know what it is. But what I'm looking for is someone who is in school and is working maybe in an ECE (electrical and computer engineering) department and has some experience in what tools are used there. I'll be entering the program in the fall so I've got six months to get a head start and want to jump on this now. The first thing I want to know is do I have to buy the $250 single use version of Matlab or can I get away with buying the $99 student version. Or can I get away with buying the even more stripped down $49 version that doesn't come with the suite of toolboxes that comes in the $99 version. Or is it absurd to not take advantage of that suite of toolboxes for an extra 50 bones?

Am I losing any important functionality by buying the student version? I remember years ago I was going to buy the student version for a project that I was going to do but that fell apart so I didn't buy it. I think the only restriction of functionality was the size of the arrays you could create with it or something like that but that was a long time ago. I'm not trying to do anything fancy, I'm just trying to learn the computer language. I'm sure I'll be working with the full institutional version once I get to the university.

As far as Python, what's going on here? Is Python free? I think I can download it for free but is this the real deal? And, importantly, what's the difference between visual Python, or vPython, and the regular Python? I've seen some great graphics displays using vPython and I'd like to learn that language, but if I just learn vPython is that the same as learning the actual Python language? Or is vPython just a stripped down version?

Finally, what are some good learning resources for an old-timer like me that likes to watch educational videos on youtube instead of cracking open a book? I mean, I'm not against cracking open a book if I need to, but please give me some easy user-friendly tutorial links that I can use to learn these programming languages.
Thanks.

I've already found one, the guy from mathtutordvd.com.

http://www.mathtutordvd.com/products/Learning-Matlab-Essentials-Skills.cfm

I like this guy. VERY easy and straightforward. Just as I like it. If you can think of any others that might help, please do tell.
 
Physics news on Phys.org
There's a good book by Hahn and Valentine on Matlab called Essential Matlab:

https://www.amazon.com/dp/0123943981/?tag=pfamazon01-20

and for Python there are really two language variants Python 2.7+ and Python 3.4+. The community did a switch with many new features in the newer python but had to support the legacy stuff that broke hence the Python 2.7+ versions.

As far what one to learn, I'd go with iPython and the notebook interface. It comes loaded with all the necessary numerical libraries that you'll need to do simulations and various computational tasks. Most shops will use either Matlab or iPython.

http://ipython.org/notebook.html

Some shops may also be looking at Julia, language not unlike Matlab but more modern and faster. There is a similar distribution that supports Julia, Python, C/C++ and R library mixing called iJulia. You can get a distribution here if you're interested:

http://quant-econ.net/python_or_julia.html

and here's a youtube video to get you started (there are a lot others so search on python or ipython):



For Julia, there are a couple of excellent ones by Dave Sanders using iPython notebook.

For Matlab calling python, here's a mathworks link:

http://www.mathworks.com/help/matlab/call-python-libraries.html?s_tid=gn_loc_drop

Lastly, there's a free clone of Matlab called Freemat freemat.sourceforge.net that does basic stuff (core language) to get your feet wet.

Eventually though you'll probably want to get the Student version $99. Let your PhD advisor/program pay for the fancier Matlab.

Hope this helps.
 
Last edited by a moderator:
  • Like
Likes   Reactions: DiracPool
Some more info on MATLAB clone if you're interested:

http://dspguru.com/dsp/links/matlab-clones

in general they don't work exactly the same at MATLAB and don't support the MATLAB toolboxes. I heard most shops that shy away from MATLAB go with numerical python distributions like ipython.

Orielly has many good book on python too. I have a couple of the pocket editions. They also have a Python cookbook which useful when you need to do a specific task.

Another resource is rosettacode.org where many different languages are used to solve a large collection of tasks. Its good for comparative language studies.

I forgot to mention that processing.org IDE has a python mode and some samples of drawing cool graphics.
 
jedishrfu said:
Lastly, there's a free clone of Matlab called Freemat freemat.sourceforge.net that does basic stuff (core language) to get your feet wet.

Great. Thanks for the info and resources, jedishrfu. I think I'm just going to buy the official Matlab version. I've already got a steep climb ahead of me and don't want to complicate it by trying to cut corners. Which reminds me, I'm not going to skimp and get the stripped-down version without the toolbox suite. It's 50 bucks. This is my future, how cheap can I get?
 
Pretty cheap :-)
 
  • Like
Likes   Reactions: DiracPool
MATLAB has many extensions, each of which cost money. I don't think they would expect you to pay for specific extensions. You should find out what would be needed on the project and ask it you can use their version. They may already have site licenses that you can use.
 
  • Like
Likes   Reactions: DiracPool
FactChecker said:
MATLAB has many extensions, each of which cost money. I don't think they would expect you to pay for specific extensions. You should find out what would be needed on the project and ask it you can use their version. They may already have site licenses that you can use.

Thanks FactChecker, but we're not even there yet. I know I can bring something useful and important to the project but I have no idea how it's going to play out practically. Right now I'm not worried about extensions and licenses, I'm worried that I don't know how to program a computer. So I'm going to try to start there. I'll worry about the licenses later :confused:
 
DiracPool said:
I'm worried that I don't know how to program a computer

If you could code 30 years ago, you can still code. On some level (unless it's a really weird language) programming is programming. Just learn the new syntax and keep a reference (or the Web) close by.

DiracPool said:
I haven't written any code in 30 years. I have no idea how things have changed

My first experience programming was a bit before yours- late '70's through 81 or so. It was using an eclectic mix of BASIC, MicroFORTH, and assembly language. Having only 16k of memory to work with we had to be somewhat creative! My next programming was in the late '90's using PERL. I didn't have any problems getting started again. A couple of years ago, it was harder moving to Python from PERL, mostly because Python looks so different- for example blocks of code are delineated by indentation, rarther than curly brackets. But once I got used to the differences, Python is just as easy as PERL.

When I started again in the '90's the biggest obstacle that I had to overcome was because my previous experience was in a very resource limited environment. It took a while to get comfortable using long, descriptive variable names and using whitespace to enhance readablity.
 
We use both Matlab and Python. The cost of Matlab and it's toolboxes is driving more and more of our researchers to Python. With Numpy, Scipy and Sympy addons Python is very powerful. If you are in some very specialist field you can still find free code developed by other researchers. I would look around and see what is available in your field. Matlab is still very good and may well be worth the cost if it has toolboxes that suit you discipline.
 
  • #10
DiracPool said:
I was one of the original computer whiz kids in the early 80's but I haven't written any code in 30 years. I have no idea how things have changed.
Depending on exactly what you were doing in the early 80s, some things will be new to you or have changed a lot.Concepts that you should get/update knowledge of include:
  • Object Oriented Programming (OOP)
  • Unit testing
  • Software version control systems (find out which one is used in your project, or learn Subversion and one of Git/Mercurial)
  • Integrated Development Environments (IDE - again find out which one people tend to use in your project (if it is Eclipse then I feel sorry for you); if you are keen on vPython then it is designed to be used with VIDLE)
  • SQL - although the database wars still rage it is no longer about the mutually incompatible Ingres/Oracle for big systems and dBase/FoxPro for micros, and the "roll your own" solution is now irrelevent. Microsoft SQL Server and the free PostgresSQL and MySQL are pretty much interchangeable.
DiracPool said:
As far as Python, what's going on here? Is Python free? I think I can download it for free but is this the real deal?
Yes Python is free. But these days most serious programming goes on in Integrated Development Environments (IDE), some of which are free and some of which aren't. IME the best free IDE for Python (which also has a commercial version) is PyCharm Community Edition.
DiracPool said:
Finally, what are some good learning resources for an old-timer like me that likes to watch educational videos on youtube instead of cracking open a book? I mean, I'm not against cracking open a book if I need to, but please give me some easy user-friendly tutorial links that I can use to learn these programming languages.
That's interesting - many old-timers like me much prefer the random access self-paced nature of a book to the serialized spoon-feeding experience of YouTube. For the best of both worlds I'd go for CodeAcademy every time.
 
  • Like
Likes   Reactions: DiracPool
  • #11
Having been a programmer for a long time, I tend to just read examples for new languages and figure stuff out from there. Sometimes the books aren't there or are dated.

In Python's case, there's two flavors Python 2 and Python 3 which causes problem during crossplatform script development ie develop it using 3 and then running it on a system supporting 2 only.

Anyway, cookbooks are great that way where you can look up a specific task and get an example of how to code it.

Also the Rosettacode.org site a good resource for some tasks.
 

Similar threads

  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
10
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
9
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 16 ·
Replies
16
Views
6K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K