Mathematica vs. Matlab? 37
Ninnux asks: "I wanted to find out from the community which was the better mathametics modeling package: Mathematica or Matlab. The cancer center I research and program for is considering purchasing a license set. I'll be working with Bayesian machine learning and other bioinformatic approaches for hormone pathway modeling. I know Matlab has various toolboxes that would be rather useful, but I'd like to hear what people think." While I'm sure direct comparisons will be made, I think focusing on the specific niche will help Ninnux the most; so, how well does each piece of software handle Bayesian functions and other bioinformatic computations?
Mathematic and Maple vs. Matlab (Score:5, Informative)
Maple is a similar product to mathematica.
So really the question is would you rather have faster numerical processing or greater symbolic capacity?
Re:Mathematic and Maple vs. Matlab (Score:3, Interesting)
I used mathematica extensively in college, and I've used Matlab + neural network toolbox extensively in my profession.
Another majore difference between the two is programming languages. Mathematica is best utilized as a functional, lisp-ish programming language, while Matlab is best for C-ish programming that is optimmized for vectors. If the whitepapers that you read for your research do a lot of AI programming in Lisp, then go with Mathematica. If the AI whitepapers use a lot of neural networks or general C/Fortran algorithms, then go with Matlab.
If you are using the math package for prototyping, and then converting the code a run-time system, then I would definitely stick with Matlab->C and Mathematica->Lisp.
Ninnux, if you are serious about this, then email me at b_pretender(at)yahoo(dot)com and I can tell you a little more about what I've used and what I've thought about it. We developed our own baysian filters and also used the Matlab image processing toolbox extensively. Most of my comments will be Matlab biased, but that is because I've used it and I've liked it.
Re:Mathematic and Maple vs. Matlab (Score:1)
Re:Mathematic and Maple vs. Matlab (Score:1)
However, it's worth pointing out that Matlab has add-on packages for symbolic manipulation (although the end result is not even close to Mathematica's capabilities) and Mathematica has perfectly fine numerical capabilities (although, not nearly as performance-oriented; generally, one is more removed from data in Mathematica than in Matlab).
My guess is: you'll be doing lots and lots and lots of simulations---same code, small tweaks, thousands of iterations. That spells Matlab in my book.
Well.... (Score:3, Informative)
Re:Well.... (Score:1)
I also second the suggestion to investigate R. It is vigorously supported by the statistics community, and has numerous add-on packages. A slightly steep learning curve (steeper than Matlab; perhaps no steeper than Mathematica for what you're doing), but very powerful environment.
Re:Well.... (Score:2)
Mathematics Software (Score:2)
I'll take them both, and charge it!
Seriously,
I've no idea of the budgetary constraints that you're under, but you ought to consider getting both of these software packages, given that you're doing real science. Further, as you're doing medical science the imperative is all the greater to get your research, and analysis right.
Double, triple, and quadruple checking your work is the way to go. Thus, analysis via more then one software package is *quite* advantageous.
FWIW
Re:Mathematics Software (Score:2)
Re:Mathematics Software (Score:1)
both reasonably good (Score:2, Interesting)
I have though found another product, Maple, to be a quality mathematics program. Perhaps you may want to consider that one as well.
Maple 8 (Score:2, Informative)
Matlab vs. Mathematica (Score:3, Informative)
Here's my breakdown of the main differences (to me):
Matlab is great for numerical simulation of _anything_. It offers the ability to go very quickly from model developement to programming and implementation to analyzing the results. Matlab has a very good GUI creator and offers _very_ good ordinary and partial differential equation solvers. Matlab's programming language is very similiar to C/C++ and it has the ability to link with C/C++ programs.
Matlab's original use was for the quick calculation of Matrix algebra. (MATrix LAB) You can do a lot with matrice algebra and matrix operators. If your application uses matrices, matlab will speed up the processing and computation by quite a bit, which includes ODEs and PDEs.
Mathematica, I found, has a slightly higher learning curve because of the symbolic language syntax. It can analytically solve very complex problems and display the results graphically pretty easily.
Matlab seems to have more additions in the form of modules that come with the professional version. The source code for all matlab functions and modules are viewable, making modification of the modules/core functions possible.
Honestly, I haven't had as much experience with Mathematica, but I find that most research groups choose matlab for numerical solutions/simulations and mathematica for analytical solutions.
The best way to make an intelligent choice is to pick up/browse Wolfram's book on mathematica (he created it) and the latest Using Matlab manual. Just remember that Matlab also contains about two dozen extra toolboxes/modules that were created by research groups for specific purposes. There is a neural network toolbox, if I remember, although I don't know if it's applicable to Bayesian networks.
Salis
Try the Free alternative (Score:3, Insightful)
Scilab is mostly free, but still not free-enough to be included on Debian (it is packaged under non-free on a Debian system). See this thread [debian.org] for details.
Re:Try the Free alternative (Score:1)
Comparisons of Mathematica, Maple, Matlab, etc. (Score:2, Informative)
I'm sure there's a lot more; try some Google searches: maple mathematica matlab [google.com], maple vs mathematica [google.com], "computer algebra" comparison [google.com].
Why would you need either? (Score:2, Troll)
Realistically, why would you need either? You can't be getting your data out to more than a few digits; even a single/short float would be overkill. So, for that matter, is machine learning...
I guess I'll rephrase this as a question: just what are you hoping that the math package will do for you? I'm not asking for buzzwords, just a plain-talk statement of the problem you are trying to solve.
-- MarkusQ
[offtopic] Gershwin (Score:2)
I know this is offtopic, but Markus doesn't have an email address posted. Please forgive me.
> "DEG DED {DE}F ED CBCA..." (George Gershwin)
This signature has been bothering me for months. The theme sounded familiar, but I couldn't quite place it. Finally, I found it about a third of the way through the Rhapsody in Blue. The reason I didn't get it right away was I was humming the wrong rhythm. It would be a lot easier to identify if you weren't missing a note! Try "DEGG DED {DE}F ED CBCA..." or better still "DEGG-DEDF---ED--CBCA".
Musically,
Div.
Re:[offtopic] Gershwin (Score:2)
-- MarkusQ
Re:Why would you need either? (Score:1)
Re:Why would you need either? (Score:2)
The formal question you pose is reasonable. However, I must take issue with your first point. {...don't reinvent the wheel...] It's always worthwhile to use the right tool for the right job.
The main point you make is quite reasonable; however, I think you have missed mine. Before you can determine "the right tool for the job" you must first know what the job is. From what he's described, I'm not sure that either package is the right tool.
Why?
Imagine the question was:
-- MarkusQ
Not a troll, darn it! (Score:2)
In case the troll moderation has confused the original poster (on the assumption that you're actually reading the thread you started):
I am not a troll. I mean my question seriously. What are you trying to do?
Without knowing that, it's hard to answer your question.
-- MarkusQ
my opinion of matlab (Score:2)
(I don't know Mathematica; perhaps it is also.)
Re:my opinion of matlab (Score:1)
As for Mathematica, one could hardly find an environment farther from Fortran.
My answer (Score:2)
Mathematica|Maple vs Matlab == Theory vs Practice (Score:2, Informative)
1) Is the problem symbolic or numeric?
numeric -> Matlab
symbolic -> Mathematica
symbolic & pretty graphs needed -> Maple
2) Do I need to write a program to do the calculations?
yes -> matlab
no -> any
Matlab has a great debugger. you can step through your program single step, into/out of sub programs, or until breakpoint. Mousing over a variable displays it's current value. I find it so useful, that even if I'm doing something in C/C++, I will write most of it in Matlab just to use the debugger, then cut/paste the routines into the project.
Matlab also has very good low-level read/write routines for reading data into it. This can be a huge plus if you need to automate your data input. Matlab is very well supported for collecting data from many types of devices, rather than typing everything in by hand.
3) Am I analyzing numbers to discover new relationships or applying data to known formulas/algorithms?
Discover New -> Complex -> Maple
-> Simple -> Matlab
data into formula -> Matlab
Matlab has very good data fitting for standard curves (polynomial, exponential, trig). I find it just general enough to be what I need in 99% of the time. Maple is a wiz at finding symbolic fits to data with complex relationship, but is much more difficult to use.
As you can see, I end up using Matlab for about 95% of my work. Between it's easy programablity, shallow learning curve, simularity to C (you can literally copy the guts of a c/c++ program, use search and replace to correct the operators, and have it run in matlab). With the symbolic tool box it nearly equals Maple for symbolic power (it actually uses the Maple symbolic engine, go figure), and the debugger is top-notch. Matlab has very good documentation, and great electronic documentation. It has above average support from the company, and the matlab newsgroup is active and generally produces intelligent solutions/comments. There are any number of 3rd party books written about matlab (the best, imho, is Mastering Matlab) to help as well.
As for your license strategy, I'd suggest a site license for Matlab and a small number of Maple licenses for people that actually do the symbolic computation (if anyone). Giving everyone access to Matlab makes it easy to share work, share graphs, ect.
MATLAB shall inherit the earth (Score:2, Informative)
I have been using matlab for almost exactly an year now and my primary occupation is doing various kinds of machine learning and computer vision related stuff. I have used Mathematica for doing simulations of chemical reactors in the past, so I have some experience with it.
If you are going to deal with experimental data, and your needs include lots of data visualization MATLAB is truly the way to go. People who like to refer to matlab as just another matrix language miss the point. Just about anyone can put a interpreter around LAPACK and give you a matrix language. What makes MATLAB so popular and powerful is the availability of very high quality libraries and the fantastic visualization tools that come with MATLAB. It is a good idea to invest in a good set of toolboxes when you buy you matlab license. Plus there is a ton of free stuff out there.
Writing iterative code used to be quite slow, but with the latest MATLAB release mathworks has included a JIT compiler which can convert some not all of your loops to machine code and give you quite a bit of speedups.
The C interface is clean, and very easy to learn. You can add existing C libraries or write new code and integrate it into your matlab setup very quickly.
The matlab programming language itself has an extremely powerful syntax. You will be surprised how much you can do in a line of matlab code.
Finally, if you need to do symbolic computations, there is the symbolic computations toolbox, which I as far as I recall is a wrapper around a maple interpreter, so you have the full power of maple available in MATLAB. I have used it and its pretty good.
My experience with Mathematica suggests that unless you are going to deal with mathematical structures, and do a lot of symbolic computation in particular, you are better of using like MATLAB.
Syntax Error... Matlab -or- Maple vs Mathematica (Score:3, Interesting)
Matlab is mostly used for creation of and use of complex algorithms, DSP simulations, and other "heavy math" tasks. It's a great swiss army knife and integrates easily with most C compilers for compiled-performance (rather than interpreted). One of the many "modules" included with Matlab is a symbolic math package based on the Maple engine (see below).
Mathematica and Maple are little more than symbolic math packages. (Don't get me wrong, they can do A LOT, but neither comes close to the full Matlab package). Each has its pros and cons, but either will do quite well for any math undergrad university student and most grad students. The merits of Mathematica vs Maple are often heavily debated on the usenet and in other forums.
Matlab, Mathematica, and Maple are all very powerful packages... they can do **WAY** more than any of the lame "MathCAD" type apps you probably used in high school.
All three are available for Windows, Mac OS X, Linux, and most flavors of Unix (Solaris, AIX, IRIX, HP-UX, Tru64). Each has a rather simple interface and "looks" like a native application with the exception of the Linux/Unix version of Matlab -- it's a quick port from Windows with some lame crossplatform toolkit. Its GUI widgets look as though they're straight out of Windows. This cannot be changed without a lot of hackery. Despite the ugly interface, I would recommend Matlab for students... the student price is about the same as that of Mathematica or Maple, yet includes so much more (plus all of the symbolic math features straight from Maple 8).
If you don't need (or don't want) all that Matlab offers, Maple may do the trick for you. I used Maple 6 for years and only recently moved to Matlab (for compatibility reasons). Maple, even the current Maple 8, is a clean lightweight application. It's easy on the disk and ram, and even easier on the CPU. And, (IMHO), it does just as much as Mathematica would for me.
Also, all three have a full-featured command line interface alternative to their GUIs. Learning how to key in equations without the mouse and tool palettes will help you in the long run -- you'll be able to enter data much faster. Brushing up on TeX and/or MathML will also prove helpful.
These days, my workstation runs little more than Matlab, LyX, and sometimes Framemaker.
coding from scratch or using tools? (Score:1)
In general, as has been noted by everyone else, Mathematica is great for symbolic analysis, and Matlab is great for numeric analysis. Most people I've talked to in the field use Matlab.
I've been doing some Bayesian analysis recently and I've been writing everything from scratch in R [r-project.org], since it's free so I can use it at home. If you will be doing the whole shebang yourself, and you have the funds, I'd advise going with Matlab, since it tends to be more stable and well supported than R.
If you are interested in R, here [r-project.org] is a page about the project to integrate graphical models into R.
You might also want to look at MuPAD (Score:1)