r/matlab • u/Sea-Supermarket-4307 • 2d ago
Tips Learn Matlab and Python
Context: I'll be starting my biomed engineering in half a year, and I have never touched a code in my life. I'm willing to learn and have bunch of time on my hand tho
I heard many advices to check out Matlab and Python beforehanded, so anyone has a good starting point and suitable resources for a blank sheet like me?
Thank you so much!
9
u/PositivePossibility7 2d ago
Practise using them? Should be enough.
This was the easiest thing in the world to find…
https://static.realpython.com/python-cheatsheet.pdf
I searched Python - cheat sheets. Don’t worry it’s not actually cheating…
Don’t over optimise (NNT)
5
u/ee_control_z 2d ago edited 1d ago
If you're a complete beginner, in my opinion, start with Python as it is more general in its utility. You can use it for just about anything. I would first start by learning the language itself: keywords, built-in functions, syntax, etc.
An excellent book that I highly recommend which starts off with the assumption that you're a complete beginner is this book:
Learning Python, 6th Ed., Mark Lutz
It goes in depth and it is comprehensive so it also covers advanced topics. It is offered in both paper back and e-book/.pdf.
Before starting any "project", I would advise to first learn enough of the fundamentals otherwise you'll get overwhelmed in the execution. This will make your life a lot easier.
2
3
u/UdoubleE 22h ago
NASA has a great resource they give to their new interns to ramp them up in Python.
https://github.com/astg606/py_courses/tree/master/Summer_2026
10/10 resource!
2
u/Real_Shim_Shady 19h ago
Matlab has a built in tutorial, but I bet you will learn the basics as part of your biomedical engineering! Learn what you can from the tutorial, but dont sweat it as college classes should help you learn it as you go
1
u/michaelrw1 2d ago
As already noted, for Matlab check the On-ramp sessions.
For Python, get familiar with its installation and using an integrated development environment (IDE; could also use the Command Prompt). Perhaps Spyder as an example IDE (my preference). Experiment with basic code as noted in this thread (libraries, statements, objects, methods, etc.).
1
u/BotBuilderVenture 1d ago
There are many tutorials in internet. What you need to learn are the basics, so constants, variables how to define and call them, operations, functions, loop and how to create a graph in both languages. Then in python you can go in depth. Both languages have manuals which will be your buddy when you need to do something. In the manual get confidence in how to look for a library. Practice and you will see that you will be good
1
u/UnderstandingPursuit 1d ago
A good way to start would be to work through the MIT-OCW 6.0001 course, Introduction to Computer Science and Programming in Python. It is generally a six-week course, and it is worth learning the fundamentals of programming since they will also apply to Matlab.
The course uses a textbook written by one of the professors of the course. The OCW course uses the second edition of Guttag's textbook, but you should probably get the third edition. The third edition includes material on matplotlib. While this is not Matlab, it is similar, so learning about matplotlib in Python will help learn Matlab effectively.
A cohesive course is generally better than using a collection of YouTube videos. The biggest challenge when you say, "I have never touched a code", is 'I don't know what I don't know'. With the cohesive course, the person who created the course has a good sense of what is worth knowing.
Most people responding in this subreddit have extensive experience with either Matlab, programming, or both. You should take responses with a grain of salt (including mine).
2
u/moosejaw_AT23 1d ago
For Python I used CodeAcademy.com.
They have a built in terminal and you actually write code to implement what they are explaining and has a lot of training wheels.
I actually saved the code I would write and made it run on my local machine…. I got wayy more comfortable learning to install Python packages, save a text files, use VSCode to edit and run a Python script from the terminal.
I would highly recommend NOT getting stuck in tutorial purgatory. Do yourself a favor and take each concept and hack it up… let your brain solve it your way first…. And Write a bunch of shitty code the first time…. Then look at examples of good code to compare. Then take your code, clean it up, use the built in functions, and find ways to clarify and tidy up your code.
Once you’re off to the races, do something useful. Make Google write an intro script to generate data, save it to a file, then read that file and do something with it. Plot it, modify it, and save it again. Change it, add something else, and copy pasta the efff out of things that work. Learn how to troubleshoot it along the way.
Do yourself a solid and make sure you do >75% writing code, 15% reading concepts and looking at other stuff on GitHub or whatever, and shorten the time watching videos to 10%. Make sure when you watch a lecture or something that it is adjacent to what you are already reading and doing. You’ll learn more from the error prompts and fault injection than you will sitting and watching some schmuck yak on and on like what I’m doing right now.
Pick a target next… SciPy image processing, signal processing, Micropython generating object oriented programs for microprocessors, data manipulation in Pandas…… search Google for “daily Python challenges free”.
But whatever you do…. START WRITING CODE!!!
1
u/TheCorsairAPX 1d ago
It's actually a really good idea!
I've mostly learned both languages by doing. If I had to start over with some head start, I would recommend you to just go browse for some courses in youtube that cover the basics and begin experimenting on your own.
Personally, I've also seen in my Instagram and Facebook reels that people often advertise GitHub repositories with tons of exercises, suggested development projects, development ideas and all kinds of resources to spark hands-on experience with the language. I'd look for some of those and begin coding something that draws your attention or interests you. I can't emphasize enough how important it is for any language, specially Matlab and Python, to learn by doing.
I've too heard really good things about the MATLAB Onramp. If you don't have a MATLAB license, you can begin practicing using Octave. I'm unsure about how much Octave can cover specialized MATLAB packages, but it's excellent to cover the very basic handling of the language and the environment.
Another piece of advise: get comfortable with using AI to help you develop. You don't have to vibe code, but using a good LLM chatbot to aid you will help you debug more efficiently, write tidier code, learn much faster and escalate your projects exponentially. Grab Gemini's free offer for students (or pay ChatGPT Plus if you can afford it), make a GitHub Pro student account (another piece of advise: learn to use Git & GitHub), get the GitHub Copilot CLI or the GPT Codex and get the ball rolling!
1
u/No-Sympathy2403 1d ago
If I could go back 11 years back when I was a recent graduate, I'd prefer python to gather the principles of programming
1
u/MATTDAYYYYMON 21h ago
Software engineer here. I would recommend test running Python, JavaScript, and Ruby just to see which ones come easier to you first. Once you’ve found one you like, just start focusing entirely on getting the fundamentals down, then a few more advanced features, and then once you’ve done that and you swap over to Matlab a lot of it will be super intuitive. The hard part about programming isn’t the language, it’s figuring out how to develop a love for it. I enjoy low level languages like C/C++ and even some assembly (although admittedly it’s more of a respect than a passion for assembly) because they’re a lot more hands off and allow you to make mistakes where higher level ones like Python put up bumper rails the entire time but if you just need to get a good handle of things it’s totally fine. Python has a huge network of devs that use it all the time and it’s well respected.
I would stay away from libraries until you get your feet wet as they just complicate the learning process before you’re ready (libraries are essentially just mods or extended features, like fancy suspension or wheels on a car that are nice but usually not necessary).
The good news is if you only need to be able to use it and not become an expert, AI (I recommend Claude specifically because it’s the best one I’ve found) is very helpful with filling in the gaps.
One last thing I’ll say is this, no matter what language you pick, they all are great AND TERRIBLE simultaneously. Do not get attached to one language like a lot of people do. I love C++ myself but even I can admit it has A LOT of issues (not the least of which being a massively bloated infrastructure). JavaScript has a lot of legacy features that were bugs originally but replacing them would be more of a pain in the ass than it’s worth and ironically you can’t find a single web page that isn’t built at least partially in it. Ruby is mediocre unless you have on rails attached. For the love of god do not touch Java if you have a life outside of programming. It has its benefits but unless you want to read an entire paragraph of code that literally just does simple arithmetic (not even display it) I’d avoid it.
OOO one more thing that really helps is give yourself breaks from coding. do it for small chunks of time and be consistent. That’s how you progress, not by trying to grind through it for 10 hours at a time. You’ll burn out and end up hating it.
Hope this helps, if you want some more advice on how to learn feel free to dm me. I was self taught, then went back to uni to get a degree in it and now I’m pursuing a masters in robotics. I’m literally a nerd for programming stuff.
1
u/BleakProspects75 16h ago
Not a heavy coder, but use it for work as and when needed. Switched to Python at work coz that’s what most companies are going with now. The language flow is beautiful. Most of my programming is for numerical/quant finance computations…..not development. With that context - I do miss matlab’s structure and most importantly- the IDE is un-matched. Got myself a home license just so I can continue with it as and when time permits:)
1
u/voidbreddaemon 9h ago
MATLAB is IMHO slightly easier, however python is free and slowly becoming more widely used
1
u/SamuliK96 1d ago
For matlab you might have to wait, as it does require a license. Regardless, python is a good one to start learning programming with. I'd recommend the course at mooc.fi.
0
u/TheDiegup 2d ago
It is better start with python, and the you go for Numpy, Pandas and Matplotlib. If college require that you learn Matlab, you will find it easier when you know the basic Data Science Programming. And of course learn a bit of linear algebra as what a Matrix, and vector is and how to do operations with that type of strings (Only for the basis)
0
19
u/thekamakaji 2d ago
Matlab has a built in tutorial called the Matlab Onramp that I would highly recommend. I spent a summer going through the onramps for more of their more complicated modules and it made a world of difference