Don't be shy, what was your matlab learning curve, how many years or months, what were the difficulties to begin with.
I think that the answers would be most valuable for new users, maybe you can also tell us the tricks that allowed you to master some parts or all matlab.
Now it's your turn...
I first encountered Matlab in the 90's working for a large aerospace company. I didn't have the opportunity to use it much then, but was always interested in severing the ties from Excel for 'real' calculations. In 2005, I was working in a test lab which used Labview and when version 8 (I think) came out, it included their version called mathscript and I thought cool, now I can learn about programming a 'matlab'-like language.
When I entered grad school, I knew I needed a math application and for whatever reason I chose (ahem) Maple. I made it most of the way through, until a class required developing models in Simulink. So, I got the student version and dived in.
I would say my learning curve was not terribly long for basic stuff, but I continue to learn new stuff. Last fall, for the first time, I was a 'lurker' on the contest page and found it really interesting. Hopefully I can enter the spring contest!
I keep my Matlab skills up to date by doing Project Euler problems and answering what questions I can here and on CSSM
My story, the first time I saw Matlab was almost 10 years ago, we used matlab in school but not very often, all we did was simple things like making simulink models and see the output, lately in Digital Control we used matlab and simulink more, only here I saw the true power of matlab and people using functions that no one told me to use in school. Now I'm working on my Thesis about the control of the Inverted Pendulum and the knowledge I found here is always useful, every day something new comes up after a question and I love to try to help others because it's a great way to learn.
My tricks are, watching experts answering questions and analyse their code, viewing matworks webinars and the blogs, and most of the time try to use new matlab functions just for fun.
My difficulties at first were related to not knowing which function to use to solve a problem, now they are with the use of functions like arrayfun, cellfun, bsxfun, etc. Their are great but I still find them hard to use, the for loops are used too often.
Right now I should be an expert but I'm not, I still find hard to solve many simple problems, still learning.
I first saw MATLAB in 1997 (v4.?) when taking a linear algebra class to satisfy my Math major. The class used this awful book. I only used MATLAB a few times, and hated it. I couldn't figure out how to do anything, and the command line reminded me of DOS.
7 years later, while doing summer internship graduate work at the lab where I now work, I was forced to deal again with MATLAB. The physicist who was my mentor was a MATLAB fanatic, and insisted that I spend the first 2 weeks of my internship in front of the computer doing nothing but playing around with MATLAB (Incidentally, he is the one who taught me to use a double letter for a loop variable). I ordered this book and just went through it. Soon I was loving MATLAB and ready to do my summer work. I also ended up learning how to write GUIs (using global variables, string callbacks and switchyard programming, yikes!). The result of all that summer's work is on the FEX.
When I returned to school in the fall I had to take a class which required the use of MATLAB. Of course I was exited to learn even more, which I did.
Since then I have written many M-Files, GUIs and even taught MATLAB to others. I am an unpaid MATLAB evangelist, both on and off the job.
I learnt to program originally in Fortran. (My first programs, as an undergraduate, were on punched cards.) After various other languages I spent a lot of time with the amazing, wonderful and controversial Pop-11. Most people here would love Pop-11, I suspect, but it never had the integrated numerical or graphical capabilities of MATLAB, though I did push it some way in that direction.
In 1999 a colleague at my university persuaded me that MATLAB would have advantages for teaching computer vision - not least, a larger user community - so we switched and I started learning it. It took me quite a while to get the hang of some of the powerful general ideas - notably the different array indexing modes - but once I did I started using it for both teaching and research, and I haven't looked back. I still enjoy those moments when I understand a feature for the first time and realise how powerful it is - bsxfun, regexp and accumarray are good examples.
Paulo, I can't suggest shortcuts to help beginners. I think it's all about reading the documentation carefully, looking at examples, and above all experimenting with little pieces of code until you're certain you know what each element does. It can take a lot of time and perseverance. My main advice to programming students is: write functions from the start, and keep them small.
Although we've had Matlab at my workplace for some time, until relatively recently I was working on matters it was not appropriate for. I moved on to my current project about the middle of July 2007, and started learning Matlab because that's what the original project implementor had happened to start with. Everything I know about using Matlab, I've picked up in the last 3 years and 7 months.
I am, though, not new to scientific programming: I've been doing a mix of scientific programming and computer/network/security administration for over 25 years, using a variety of languages.
I actually had a copy of MATLAB for the Mac, a version that I think ran on a 512k Mac or so. (Mid 1980's.) This was back in the infancy of MATLAB. Actually though, at the time I was still using APL for most of my work, even some Fortran then. I'd written many complete toolboxes by then for APL - splines, linear algebra, optimization, random variate generation, statistical tolerancing, etc.
With that background around 1988, I then found myself attached to the ColorSense program at Kodak. That group was using MATLAB to do their work, so I picked it up in earnest then. (The MATLAB version at the time was 3.5.) We developed a large library of tools for modeling, as well as developing a consistent documentation style for the group tools that all were using. Every Friday afternoon our group would meet in a peer review session to decide which tools would be admitted to the group library.
Since that time, I've written a few dozen toolboxes for various applications in MATLAB, at least a few of which are available on the FEX.
I've started programming in Sinclair Basic on a ZX81 in the 80th. It was an exhausting challenge to write a check player or a analog clock with just 1kB and 64*44 pixels. In the university I've learned how to program larger computers in C and Fortan.
The lab I've worked in 1998 used Matlab 4.2 to solve tin batch processing jobs, and my co-worker told me that it is very slow, because you have to cast each command inside an EVAL command and this dynamic creation of variables ruins the efficiency. The first Matlab-program I saw used an EVAL in each line! After reading the Getting Started chapters of the doc (yes, I've read them all!) I found out, that it was very easy to improve this program by simply deleting the EVALs.
The next step was to learn the unique idea of Matlab and use arrays instead of the elementwise processing. A very important milestone was learning how to use CUMSUM for indexing in a post of Bruno in CSSM (Thanks Bruno! I owe you 200 hours processing time).
After some time, I reached the magic limit of 100.000 lines of code and any further changes and additions lead to the unavoidable clash, because it is impossible for a person to keep the full overview in such a number of interdependencies and different versions. Because there were urgent demands for reliability in the field I've worked in, I needed new programming paradigmas:
The more features these programs had, the longer the execution times was. Matlab's PROFILEr is so kind to tell the programmers, where the bottlenecks are and I started to replace them by tiny and easy C-mex functions. A lot of discussions in CSSM helped me to improve the internal data representation of my code, e.g. accessing the arrays columnwise, such that contiguos blocks of memory are processed. I've learned to use shared data copies from the C-Mex functions submitted by James Tursa (Thanks James! It's your merit, that I can stil run my programs on a 512MB Pentium-M laptop.).
Today I want to pay back te knowledge I've obtained from CSSM. Efficient programs reduce the CO2 production, therefore it is worth to invest some energy in efficient programming techniques. And I admit that the interaction with the Matlab community means a lot of fun for me.
I would say I've been using MATLAB consistently for about 11 years, since my first year in graduate school. In undergraduate, I may have used it a few times for a homework set. I say "I may have" because I don't quite remember anything about it except that I had an installation disk.
My experience in programming prior to MATLAB was some BASIC from childhood and a little bit of Pascal from a couple of courses in undergraduate. My graduate advisor was a heavy MATLAB user, and my initial experience with it involved deciphering his MATLAB code for doing some plots. At the same time, I was taking a controls course which required me to learn Simulink.
I remember struggling a lot for the first few months. I didn't hate it because I kind of liked programming. But I was definitely struggling. Having done some stuff in Maple before, understanding how to plot a function in MATLAB was very difficult. It took a little while for me to grasp the idea that I have to define the vector before I can plot it.
x = 0:0.1:10; <-- this was hard to grasp at first plot(x, sin(x));
Once I overcame that initial hurdle, I started to really enjoy it. I began experimenting with MATLAB code and reading the documentation and tutorials. But I didn’t really “get” the power of MATLAB until my advisor showed me this code for a simple peak-finding algorithm (of course there are more sophisticated, more robust methods):
% Sample data t = 0:0.01:10; x = sin(2*t) - 3*cos(3.8*t);
dx = diff(x); % get differences between consecutive points pkIDX = (dx(1:end-1) >= 0) & (dx(2:end) < 0); % look for slope changes pkIDX = [dx(1)<0, pkIDX, dx(end)>=0]; % deal with edges plot(t, x, t(pkIDX), x(pkIDX), 'ro');
This was such an eye-opener. The fact that I could find peaks without having to loop through the vector really made me appreciate the power of MATLAB. Read a post about it here.
After a few months into using MATLAB, I discovered CSSM (MATLAB newsgroup). I started posting questions left and right, and I learned a lot from the forum. Soon after, I started to answer some questions, and reading CSSM became my daily ritual.
About a year after the start, I saw one of my lab mates creating a graphical application in MATLAB. I was completely blown away by what I was seeing, and I started to play around with GUIDE and then some programmatic GUI building. That’s how my passion for GUIs came about. Because of my research background (biomechanics), I had a need for creating animations of my biomechanics experiments. That allowed me to learn everything that I currently know about handle graphics. Having no formal training in programming, I found MATLAB to be a great tool for making me feel like a programmer. I love that a lot! With the new and improved capabilities in object oriented programming in MATLAB, I’m starting to do a lot more OO programming lately.
I think the key to becoming proficient in MATLAB is to be curious and to try things out. The documentation is rich with examples, so read up on it and experiment. And use resources like MATLAB Answers and CSSM to keep sharpening your MATLAB skills.
I graduated end of 1994 and knew a symbolic math software (I do not name here :-) ) from my time at the university.
When I started my career as a researcher, I used this tool write a certain simulation. This however was mostly numerical math and thus the simulation ran for multiple hours. I asked around (not much internet research those days...) and somebody suggested to try MATLAB. As the simulation took just a couple of minutes, my professor an I were very excited.
Consequently, I joined a MathWorks (it was a distributor to that time) seminar and learned about Simulink, Real-Time Workshop and other magic things. Since then, I created multiple applications for student labs and research application of all kinds.
I remember vividly the excitement when MATLAB 5.0 (Release 8) came out, beacuse it was the first release on a CD!
It's a long time coming, but... :) Hadn't seen this owing to not having switched from cs-sm.
Is interesting to hear the stories/experiences--after reading the others to date I appear to be even older -- my first copy of Matlab was V3 altho after a search I can't seem to locate it any longer to find the actual date. It must have been sometime in mid- to late-80s, though. By that time I had 10 years of programming (virtually all FORTRAN from IBM 1620 at uni to Philco 2000 followed by CDC-6600/Cyber-7600 doing support and development of large (by the standards of the day's capacities--even the 7600 had only 64k 60-bit core memory and up to 512k-words of secondary memory) nuclear design codes for commercial power applications for a reactor vendor followed by almost another 10 year of consulting work where the variety was wide but still almost all FORTRAN but by then on VAXen/DEC10 w/ a tiny bit of IBM 370 thrown in just to be able to curse JCL.
At the time and the impetus for purchasing Matlab was I had been doing failure modes and effects analyses on reactor control systems which entail reading every schematic (of which there were several thousand) and by hand, writing down the action of each and every controlled element and aux output contact given a loss of power to that particular element. After that was compiled into a database, it was then necessary to aggregate all elements on each power supply at and below each branch point and then propagate a hypothetical failure at that point thru the entire rest of the system and ultimately assess the state of the plant and safety implications of that state. The real pressure of the job was that it was verified by actually going to the plant in question and pulling a fuse at a given point and observing state and comparing to the database.
I was desperately looking for ways to implement the logic to be able to automate this process and link controlled components to their circuits and them, in turn to the power node hierarchy. I had not succumbed to the PC craze until the AT and when employer offered and interest-free payroll deduction plan, I bought (for a mere $4000+) an AST 8(!)-MHz/AT w/ 1 (whole!) MB of memory. I had at that time also been involved with a robotics effort that was implemented in Forth and was strongly influenced by the power of "defining words"--a mechanism by which one could build runtime code that was dependent on the data supplied. I worked on the problem down that vein for a while before deciding it wasn't what was looking for and then a PC/AT Smalltalk was released. Again, it had promise but didn't have the facilities was really looking for.
So, I then heard of Matlab and thought the array syntax and similarity of the language to Fortran that I knew much better than Smalltalk might be a solution. In the end, that also never totally panned out altho I was able to do some small-scale problems with it I was again unable to implement what I really wanted which was essentially a reactor controls simulator w/ power loss response capability. Twenty/thirty some years later I think I now actually have learned enough to now know how one might implement such! :) (I will note that all of the above efforts were not done as part of the paying "day job" but were moonlighting efforts on top of actually plodding along on the actual analyses by hand so it wasn't quite like I was getting uninterrupted periods to work on it. In the consulting game we were competing against several other vendors for a dwindling amount of business and I was hoping if I could build a toolset I could underbid the competition as well as not have to work 16-hr days to meet deliverables.)
Meanwhile, doing that I began to appreciate what Matlab could do for other computational areas and continued to use it off and on as individual projects arose where it was aptly suited; primarily the graphics that was well ahead of anything else available to me at the time other than the Tek workstations or drawing Calcomp paper plots from the VAX w/ DISSPLA.
After that point my directions again switched to supporting mostly the fossil utilities rather than nuclear and were directed mostly to controls and instrumentation and development of new techniques for pulverized coal flow. In those, visualization and signal processing were key areas.
As for learning, it's all been a very long-term case of osmosis and as another said while he had 3+ yr of Matlab experience the 25+ of programming was probably key in the ability to simply switch implementation languages as opposed to starting programming from the beginning.
I recall my first FORTRAN on the Philco in '68 was a pretty feeble piece of code albeit it did get the job done (eventually). I'm sure if I had had no more experience when first installed Matlab as did when punched the first card deck I'd have been at least as inept... :)
Indeed...some have been very handy in an off-list mentoring situation last month w/ a Indian student studying in Sweden while working as an (apprently unpaid) summer intern in Berlin. Wouldn'ta happened when I was his age...
Not sure how much more TMW would want me to let out of the bag here...I do still have intentions of looking at some that I haven't gotten to yet with respect to some ag production areas on the farm that I thought might be an area for another direction for toolboxes to head...but, w/ the severe drought I'll have to get some previous data to even get started as we had essentially no production of winter wheat this year.
I started using MATLAB in 95, but I didn’t get serious about it until 97. Being more of a "low level" programming and electronics engineering guy (uP/uC systems) at that time, I had worked with several assembly languages, C, Pascal, and Fortran, prior to really starting with scientific computing. From 97 on, I have been using essentially MATLAB/C for engineering projects, Sysquake for building highly interactive demonstrators (MATLAB syntax "compatible" and really worth the try), Mathematica for physics and mathematics, and Python for data pre/post processing and for "gluing things together". I slowly shifted towards MATLAB as this is where my projects lead me. Now I am essentially mixing MALTAB, Python, and ArcGIS, even though people who know me are likely to call me a MATLAB evangelist ;-)