Tips & Tricks

amit jain

How to learn MATLAB

amit jain on 10 Feb 2011
Latest activity Reply by Anamika on 2 Jun 2023

What is the best way to learn MATLAB at home without a tutor?
Anamika on 2 Jun 2023
There are many resources available to learn MATLAB, it includes from official MathWorks documentation to online courses and tutorials. You can install MATLAB and also can download a free trial version of MATLAB or purchase a license from the MathWorks website also explore the MathWorks website it provides extensive documentation, technical support, and community forums for MATLAB users, use these resources to learn more about MATLAB's applications and best can take online courses which will help you to build your knowledge about MATLAB .Several textbooks and reference books are available on MATLAB and its applications, also you can look for books that are relevant to your field of study or application.The best way to learn MATLAB is by practicing as we know practise only can make us perfect at anything. Work on problems and projects related to your field of study or application, and experiment with different MATLAB functions and commands. I hope these advices will help you to learn about MATLAB and it's application
Vinay Singh
Vinay Singh on 5 Nov 2022
I think this threas id closed but everyday new courses are launched by various big portal like udemy, coursera, linkedin, Codeacademy, Here we have listed the best one that you should start with.
Janosch Herrmann
Janosch Herrmann on 9 Aug 2022
The others have already mentioned a lot of great resources, so I just wanted to add this website that aggregates courses from different online learning platforms. You can just search for "MATLAB" and you'll find dozens of highly rated courses:
Hope this helps :)
Full disclaimer: I'm actively involved in the project, but I think it's a great fit to find awesome MATLAB courses nevertheless (I used it myself when I was learning MATLAB for university)
ali alireza
ali alireza on 27 Jul 2019
i think you can learn matlab in mathworks site with contents and movies. or the other sites like tootik
Keyul S
Keyul S on 19 Jun 2019
Learning a MATLAB require constant practice. I usually prefer free Matlab courses collection that is very useful anytime I need to learn new things in Matlab.
jack mark
jack mark on 19 May 2019
You can learn matlab online you can check best matlab tutorials at Hope this will help you.
John D'Errico
John D'Errico on 1 Mar 2018
My own take on learning MATLAB is to use it. Play with it. Try things out. If you don't know how something works, then read the help. (Doc is more complete than help.)
If you are really just getting started, then the getting started tutorials are a good thing to read.
A good resource is to use help on a directory name. For example, the matrix functions are found in the matfun directory. So try this in the command window:
help matfun
matrix functions - numerical linear algebra.
Matrix analysis.
bandwidth - Matrix bandwidth.
isbanded - Determine whether a matrix has certain bandwidth.
isdiag - Determine whether a matrix is diagonal.
ishermitian - Determine whether a matrix is Hermitian.
issymmetric - Determine whether a matrix is symmetric.
istril - Determine whether a matrix is lower triangular.
istriu - Determine whether a matrix is upper triangular.
norm - Matrix or vector norm.
vecnorm - Vector norm.
normest - Estimate the matrix 2-norm.
rank - Matrix rank.
Lots more will appear. If a function interests you, and you think it may prove useful. Click on the name. Each function name is a link to the help for that function.
Now do the same thing for other directories.
help strfun
help polyfun
You can also go into the doc tools like this, using
doc matfun
doc strfun
doc polyfun
So as you are getting started, EXPLORE MATLAB. Wander around. Poke your head into things. Try out any demos you may find.
As you get more sophisticated, you can try things like Cody, found on MATLAB Central. This will drive you to solve simple problems. Be careful though, because Cody can teach you some bad habits too to try to super-optimize your code to be as short as possible. Ultra-short code is rarely truly good code, as it can be difficult to read.
Other things you can do are to try to solve problems from external sources. For example Project Euler has some fascinating problems, some of which are truly difficult. With only moderate effort, you should be able to get through at least a hundred or so. (When last I checked, my personal count of problems solved was up over 300 or so, so many problems there are eminently doable.)
Other things you can do are to read Answers. You can learn a lot by reading advice from experts with the language.
If others that you work with also use MATLAB, other students, etc., then talk with them.
In fact, I learned MATLAB by using it, by working with others who used it on the same types of problems I needed to solve.
Remember that different people learn differently. Some will be best off reading a good book on the subject. There are lots of them out there. Personally, I'd just look online and read the reviews for any book that caught my eye. No matter what, you will want to get your hands dirty. Try things out.
Finally, always remember that advice you get from online can be suspect, just as advice you get from your friends at work or school. Not all users are experts.
Stephen23 on 1 Mar 2018
@sandeep nagar: I reviewed the free preview of your MATLAB book Introduction to MATLAB for Engineers and Scientists. It needs a good editor and to be reviewed by experienced MATLAB users, as it contains mistakes and is missing a lot of useful advice. For example:
  • 1.4.1: "When input is fed into the MATLAB command prompt, the Julia language..." What does Julia have to do with MATLAB? What does "fed" mean: does MATLAB require a sandwich for lunch?
  • It would help a lot format the text better, for example to use monospaced text to indicate code. E.g. 1.4.2 "By default, MATLAB works with the format short command", but this would be clearer with monospaced text: "By default, MATLAB uses the format short command", or placing the code on its own lines.
  • In fact this statement should be revised anyway: it would be more accurate to say the "the format is set to short" or similar, following the nomenclature used in the MATLAB documentation.
  • Get rid of the line numbering: it does not aid clarity, and does not reflect what users actually see in MATLAB. If line numbering is required then format it so that it is clearly not part of the code (e.g. a gray column).
  • 1.4.3 "A number of physical constants are defined: pi, e, ..." is incorrect: neither pi nor e are physical constants, and e is not defined in MATLAB (only exp is). You should revise what physical constants are (e.g. here or here).
  • 1.4.4 "... using the command clc, which clears the screen": clc clears the command window.
  • 1.6 Variables: "..we use variables that store the values at a particular memory location and address it with a symbol or set of symbols (called strings)...". This is highly misleading: strings are a data class in MATLAB, and are not related to the names of variables. I have never seen anyone refer to variable or function names as "strings": have you?
  • What is a "symbol" anyway? You don't define this, nor is this term used in the MATLAB documentation for variable names, and it is not a term I have ever seem used when discussing character sets (except for the specific subset of some character sets that might be called "symbols"). Why do you invent your own confusing terminology which is unrelated to what the rest of the world uses?
  • 1.6.1: "Complex numbers have real and imaginary parts, which are stored separately." is very ambiguous: what does that mean? Is a beginner supposed to know what that means in practice?
  • 1.6.2: "Names should not start with a number" is incorrect: variable and function names cannot start with a number.
  • 1.6.2: You omit the very important advice to use which before using new variable names. This is much more useful than iskeyword, which you go on about in some detail, yet would really help beginners to avoid basic bugs that we keep getting asked about on this forum. Clearly the author has not spent much time bothering to learn what common mistakes beginners make, and how to avoid them.
  • The next chapter is titled "Global and Local Variables", so apparently the bad advice will continue... why introduce beginners to bad practices when you are still on chapter 1.6?
  • Some thought needs to go into the choice of typeface and the overly bold text. The formatting is rather haphazard: using bullet-points is not synonymous with creating a clear document format.
  • The imprecise, colloquial language should be revised, e.g. terms like "fed" have no meaning in MATLAB (or in any programming language that does not use punch cards (perhaps it does in Chef?)). Using correct terminology makes information clearer, and makes the information transferable because it matches what the MATLAB documentation actually uses, and what other MATLAB users write.
Summary: Definitely not recommended. Confusingly written, with incorrect terminology, and in need of a good editor. There is simply too much half-baked advice, and it has clearly been written with more enthusiasm than expertise. It omits basic concepts that any experienced user would be aware of (e.g. which, avoid global variables, avoid multiple assignments on one line, etc).
I recommend that beginners instead start with the MATLAB introductory tutorials, which are better written, factually correct, use the correct terminology, and do not recommend pointless or bad code practices (e.g. global variables):
Also important is the online documentation, or downloading the PDF documentation:
There is no reason why beginners should not go straight to the source for the best information!
sandeep nagar
sandeep nagar on 1 Mar 2018
Hi, I have written 5 introductory books for #MATLAB and its #opensource alternatives for numeric and scientific computing in general (using #Julia, #Octave , #Scilab and #Python).
Please check out the link
The website also host "Learning resources" having useful videos and links to other specialised books. Please have a look on these books and kindly share this information with your colleagues and fellow researchers. You may like to recommend the books for libraries too.
Taylor on 22 Feb 2017
The recommendation I received (but have not yet tested) is to pick a simple question and then try to design code for it. Many of the professions I know who use it say they taught themselves how to use MATLAB.
Saurabh Hooda
Saurabh Hooda on 18 Nov 2016
Am referring to find the best online MATLAB tutorial. Am I right in doing so or I need something else? Thanks.
muhammad alli
muhammad alli on 1 Oct 2016
Dabbling yourself through little projects is how I would advise you go through it, the Mathworks website is an amazing resource, I wrote a book that's advertised here on Mathworks if you'd like some basics and fundamentals outlined, I currently teach Matlab at my University and think that minimalist unambiguous examples are the best. Check out my book if you like.
Matt Tearle
Matt Tearle on 15 Apr 2016
Matt Tearle
Matt Tearle on 15 Apr 2016
In addition to the online learning options Andreas mentioned, you can also get started in MATLAB by taking the free MATLAB Onramp. It teaches you the basics of MATLAB interactively -- you actually try out the MATLAB code and you see the results and feedback to help you.
Andrew Newell
Andrew Newell on 11 Feb 2011
CSSM is the Matlab newsgroup (comp.soft-sys.matlab), which you can access using the newsreader. It might be more useful, though, to look at the FAQ first.
John D'Errico
John D'Errico on 1 Mar 2018
Note that CSSM is no longer mirrored on MATLAB Central. You would need to find it from Google Groups, or some such source.
Bjorn Gustavsson
Bjorn Gustavsson on 11 Feb 2011
In addition to the other suggestions, may I suggest that you should also look through the matlab demos. There you get good examples of how a wide range of problems are solved. That way you can also focus on the type of problems that interest you at the moment, or just give yourself a very wide overview of what is possible. It will teach you plenty of good habits too. This in combination with experimenting and doodling (with lots of help of matlab's help function!) should get you going.
Igor on 11 Feb 2011
In fact, in addition to reading, nothing has helped me learn Matlab more than doing small experiments at the command line and incrementally building on what I discover.
And excelent help-system with "Getting Started"!
Sean on 11 Feb 2011
I would respectfully disagree with Andreas about formal Matlab training. In my experience a training is extremely expensive and does not offer much that you cannot get by reading the documentation. In fact, in addition to reading, nothing has helped me learn Matlab more than doing small experiments at the command line and incrementally building on what I discover.
I would also suggest reading the CSSM newsgroup. Usually I do not even need to post a new question. Almost invariably, if what I need is not in the documentation (meaning there is not already an existing built-in solution--a remarkably rare occurrence) then someone has asked a similar question on CSSM. You can learn so much from the way others attack a technical problem.
Sean on 11 Feb 2011
I used to work for Northrop Grumman, where I took both the basic and advanced Matlab training. Even in the advanced training, there was very little presented that my group not only already knew, but was required to know in order for us to do our work. We ended up starting our own internal training for new hires and general knowledge sharing. I enjoyed the training, and the instructor, but there was very little content that made it worth the significant expense.
Andrew Newell
Andrew Newell on 11 Feb 2011
For explanation of what CSSM is, see separate answer.
Sean de Wolski
Sean de Wolski on 11 Feb 2011
I agree. I've learned MATLAB pretty much exclusively from CSSM and by decoding functions on the FEX.
Andreas Goser
Andreas Goser on 11 Feb 2011
I need to accept your personal experience with that, but I am know the very positive feedback from our customers. If you do not mind, please send me an email with your personal experience and I will provide this to the rightpeople.
Matt Fig
Matt Fig on 11 Feb 2011
I agree about the training too. Too fast pasted and short to do much more than demonstrate the product. A good book and/or practice is the way to go.
Matt Fig
Matt Fig on 11 Feb 2011
This is the best general MATLAB book out there in my opinion, look at all it covers in the description. It is the book I learned with, and I highly recommend it.
Sean de Wolski
Sean de Wolski on 11 Feb 2011
I'll also give this book a thumbs up.
Plus, if you buy it, you support my University!
Andreas Goser
Andreas Goser on 10 Feb 2011
There are many options I can recommend.
IMHO, nothing can beat a real professional training. That is highly efficient and effective.
But you said you like to learn from home, so here are some ideas I can recommend:
  1. Get started with the MATLAB tutorials
  2. MathWorks E-learning courses
  3. You likely have a certain field of application you like to focus like Image Processing, Control Design, etc. If you choose a book from that field, you not only learn useing the products, but you apply it for later use.
Jiro Doke
Jiro Doke on 11 Feb 2011
I'd like to add that inside Andreas's first link, you'll find a link to the Getting Started with MATLAB Guide, which is also available in the MATLAB in-product documentation:
Vieniava on 10 Feb 2011
In my point of view starting "without tutor" is very time consuming.