I’m given a copy of Matlab to evaluate, and have extensive but now 10 year old experience with Mathematica. Can I trangulate somehow from my experience to get my hands around Matlab more quickly? My goal is to understand whether I want to have it to fill some unmet need, or indeed whether this is the reminder that I really ought to spring for Mathematica.
Mathematica can do symbolic and numerical math, whereas Matlab is entirely numerical, as I understand. Right?
Does Mathematica still use the Notebook document metaphor? Does Matlab have some alternative with any similar abilities?
Is Mathematica more aimed at mathematicians than Matlab, and Matlab more at engineeres than Mathematica? Which product do more scientists use?
I did look briefly at the web sites, but if I missed some area there that would help, please tell me so.
Mathematica and Matlab are really not comparable. Matlab is basically a programming environment with a lot of mathematical routines built in, especially for matrix work (the “mat” in “Matlab” actually stands for “matrix”, not “mathematics”). Mathematica, as you know, is primarily a symbolic algebra package. The only other product which really does the same sort of thing as Mathematica is Maple, which differs primarily in the user interface, so whichever one of those two you’re more familiar with, you should stick with.
Scientists can use either Maple/Mathematica or Matlab, depending on what their needs are. Mathematicians are more likely to use Maple/Mathematica, if anything, since they’re generally not as interested in numerical work. I don’t know about engineers, but I would imagine that they, like scientists, would use either, depending on the application.
As an undergraduate engineering student, I was a teaching assistant for a MATLAB course from 1989-1991. I also used both Maple and Mathematica during that time.
As engineering students, we used MATLAB as our primary number-crunching program. It was far more efficient than FORTRAN, the other program that was taught.
You could do some serious number-crunching with MATLAB. I once ran a routine that took nearly a week on a Sun Sparcstation. IIRC, we were trying to find the optimum configuration for a chemical reactor setup with something like 12 variables (e.g. temperature, feed rate, size of reactors, number of reactors in series, number of reactors in parallel, etc.)
I’ve only ever used Maple and/or Mathematica for theoretical math problems.
I believe there is a symbolic math toolbox for Matlab. Yes, I just looked it up. I don’t know how good it is though. There is a toolbox for just about everything in Matlab. Good program. I don’t know about it being more efficient than Fortran though. Perhaps for matrix specific problems.
Based on my (relatively recent) days in school, Matlab actually seemed less efficient than Java, let alone C++, at matrix computations. This became especially evident when we worked on larger problems. For example, running a small, academic example case from my machine learning class took twenty minutes per trial with Matlab, while essentially the same algorithm took about four minutes to run coded up in Java. The advantage was that it sometimes felt easier or more natural to work with it, especially when dealing with matrix problems.
I’ve got pretty extensive experience with Matlab…used it for signal processing algorigthms and first used it just for linear algebra. As has been mentioned, it’s main strength is massive computation with matrices. They’re not really interchangable programs.
Of course, Matlab (an interpreted lang) is going to run slower than any compiled languages. It’s appeal is in it’s built in matrix structures, it’s many, many included math functions, and it’s ease of programming. A couple of months ago, I wrote a relatively complex program (I’ve had never, ever used it) with only it’s built-in help utility for reference. Try that with C++.
Where Matlab suffers, IMHO, is in it’s “Structures” (ie a mixed type matrix “DataSets”). If you really want a kick-ass environment to program math in, forget about Matlab (and it’s expensive price-tag) and download R (http://www.r-project.org/). Built in functions FOR EVERYTHING and it handles Matrices and Data Sets with ease.
The URL you linked is picking up the closing parenthesis for some reason. Try this: http://www.r-project.org/ I’ve never used it as it is described as a “statistics package”, but now I’ll have to check it out.
I’ve used both of those mentioned in the OP for various purposes. Mathematica is great for doing symbolic algebra (far superior to Maple, IMHO) and has a very pretty and relatively intuitive interface but it isn’t the fastest when it comes to numerical computation and especially dealing with large matricies, especially sparse matrix solving. I bought and used the Student Edition a few years ago when I was doing some hobby work with cryptology and really loved for that sort of thing.
MATLAB is great for handling large amounts of data and doing matrix operations but is definitely not self-explanitory. I used it back in school for controls class, and while it is a great tool for that purpose the lack of documentation (the instructor handed out a single, handwritten page that was rife with errors) was the cause of many late nights in the lab. I used it now (occasionally) at work for sorting through data, but because of the different formats of data tables from different FEA codes I often find it easier to use a simple perl script.
I don’t know why you’re evaluating it, but you might also check out OCTAVE and Scilab as freeware alternatives to MATLAB. I haven’t used OCTAVE, but Scilab is pretty functional, actually faster in certain types of operations than MATLAB, and isn’t too buggy.
As far as who uses what, I’ll note that at University the only department that had Mathematica was the Maths department, while the Mechanical & Aerospace Engineering And Engineering Mechanics, Electrical Engineering, and Civil Engineering departments all used MATLAB, and the Physics Department used…Mathcad and Derive. :rolleyes:
Regarding the efficiency of MATLAB versus FORTRAN coding, it will depend on what libraries you are using. I’d be a little surprised if a large problem ran faster on MATLAB than on a comperable precompiled IMSL algorithm, but maybe so. You have to compare apples to apples, of course; no submitting a FORTRAN job to the queue an overworked VAX mainframe while running the same problem on MATLAB on a dedicated Beowulf cluster of overclocked G4s.
I’ve only ever used Matlab, but I should note that Matlab isn’t strictly for maths applications. When I was using it I was controlling a Kephera (?) robot on the serial port and grabbing pictures from a webcam to apply computer vision algorithms to them.