Use of Math Languages and Packages in Research?
CEHT asks: "As a research programmer at the university, I have encountered numerous times when I need to choose which language(s) or package(s) to use for different projects. Tradeoffs and performance issues have to be considered: results from one package may be more compatible with the data from other researchers, another package may find the solution faster and use less resources, and so forth. Maple,
Matlab, Magma, and Mathematica
are among the most well-known packages. Libraries such as IMSL is also popular. Of course, there are smaller (and mostly free) packages that tend to target specific types of problem, such as LiDIA, Singular, and LAPACK.
The question is, how useful are these [and other] math packages? Do researchers use only one or two packages for most of their projects? Or do people like to mix things a little by pulling the strength of different packages together to solve a math problem? If not, do researchers write C/C++ programs and use GMP or Matpack to solve math problems?"
This is interesting because I always found Mathematica hard to use and I majored in Math in college. I found that I didn't need to use the package at all.
Whenever I need to do anything like that, I use Octave.
But masters, remember that I am an ass: though it be not written down, yet forget not that I am an ass.
MATLAB is the Shiznit. With my optimization toolbox I be f*cking all ya'll up.
I don't need no fool mouse
Now, I'm only in college, but while we did dabble a bit in Maple and a few others that you mentioned, the only Math software package I've used extensively is MathCad. I've found it to be the most user friendly of the bunch, and they have a new version out: MathCad.com
maple and matlab i have found to be useful
but that is only if u are doing a highly intensive amount of math
otherwise it takes longer to figure the gui and usefulness out than to figure out the problem on your own
matlab rules for matrix math
[I can picture a world without war, without hate. I can picture us attacking that world, because they'd never expect it]
I use `expr`.
In Experimental Nuclear Physics (ENP) there is a healthy mix of Fortran , C, and C++ (and some others). There is a healthy schepticism of "black box" programs and libraries so programs like Mathematica and Mathlab are pretty much not used. Also, most of the problems are pretty specific (and time consumming to run) so everyone seems to run specialized code (Example: Radware is very popular in Nuclear Spectroscophy). Of course it helps that most ENP's are pretty competant with computers and electronics (amoung other things).
Galium Arsenide is the material of the future, and always will be.
I just use my trusty abacus most of the time.
matlab for design prototypes of numerical algorithms and for visualizing data.
mathematica for doing messy algebra/calculus/differential equations.
my own c/c++ code, with a lapack backend, for doing large-scale computations (matlab and mathematica are too slow for big computations).
So, the answer is e) all of the above!
All is Number -Pythagoras.
All of these packages are extremely useful. But they are designed for different needs. From my expericence: Maple does symbolic maniuplation (good for verify homework), Matlab is good for matrix manipluation (both have nice IDEs). And LEDA is useful graph/geometry work.
I study engineering and we most frequently use Matlab. It's good at numerical computation, it's simple to code something and draw graphs, interpret your results... Maple and mathematica both do symbolical math but for engineer's that's less important. Really over here everybody seems to use matlab from control theory to acoustics to electronics
I use a calculator, but then again I'm not very smart.
In general, if you are not teaching yourself and your students to work real math with computer aids you are limiting yourself to pre-1960 technology. This applies to most math in the US. Students should be taught to use proof engines like larch to enter axioms and check and generate theorems.
Is there a good gneral math package that provides "virtual calculator" type functionality? Something that provides features akin to A Ti-8x (Minus the graphing, of course) would be ideal.
TODO: Something witty here...
Let's not forget about PDL, the Perl Data Language. Think of Matlab combined with the goodness (i.e. CPAN packages) of perl.
"If not, do researchers write C/C++ programs and use GMP or Matpack to solve math problems?"
No! They use FORTRAN!
Surely it's still much better language for numeric stuff
I'm an artist, and as such I'm not expected to know a lot of math. So I obviously have nothing to suggest to this guy.
But I would like to share my own method for solving some problems, mainly geometry problems. I work in 3D, Lightwave to be specific, and I've helped engineering solve some mathematical problems with it. For example, there was a question about how to build a sphere with each face being in the shape of a pentagon. They needed to know what the angles of some of the vertices were. While the engineers were busy pushing numbers around on paper, I built the model in Lightwave and used its tools to get the right measurements. Actually got it done before they got their equations done. That was kind of cool.
As I said, that doesn't really help that guy. I just thought solving a math problem like that using a 3D app was kind of interesting. New? No. Just interesting. Math is not my favorite subject but at least I've got tools today that prevent that from being a huge disadvantage to me.
Do any of the listed tools/languages take care of this problem for me? I understand the nature of the problem, but it is still very frustrating. What do the "pure" math programming languages do with this issue?
--sex
Very popular slashdot journal for adul
I have used a few other packages, command-line utilities, which I find useful: Recently I'm using one for my honors research project (I'm an undgergrad): GAP and another I've used which I like: PARI-GP. GAP tends to deal with group-theoretical functions, and GP tends to deal more with number theory, but both shouldn't be ignored.
I find that each package is well suited for a particular use...
MATLAB is great for off-the-cuff research. I can open it up, and program image processing routines in 30 minutes or less. This would take hours in C/C++. Additionally, I can take the M-file and dump it from my computer onto a workstation running MATLAB and get some decent speed and batch processing done.
C/C++, however, gives you so much more control and execution speed, that often you either use the MATLAB --> C compiler, or end up writing a final routine in C directly. I believe for image processing, as an example, you can get over a 100x speed increase just by using the MATLAB --> C compiler.
Just my $0.02.
"Owning a computer is like having your very own TV -- with a built in radio!" - Ed Helms
I have heard of some very serious algebra/algebraic geometry being done with Maculay (a fast specialized algebra system).
I've used python and Numeric and coworkers of mine have used them in real physics type stuff and it is great (I think Fermi lab uses Numeric a great deal).
I'm surprised you also haven't mentioned R. It's a stats
package (gpl'd) modled after S. http://www.r-project.org
and it is very powerful with a great community behind it. It's an amazingly powerful tool for analysis.
For my research in mechanical engineering (more specifically regarding tolerances), I use Matlab since it's what I'm most comfortable with. Maple is also used at my Uni, but I don't have much experience with it (other than it's symbolic kernel since it's available with Matlab) so I don't end up using it.
It mostly depends on what you're doing. Depending on your area of research, you may find that one of those is more popular because it solves these types of problem better. If speed is an issue for you, you can easily port your algorithm to a compiled language if you prototyped on an interpreter, even interfacing the two in some cases.
darn difficult it is too, what with va lairIE's patentdead PostBlock(tm) device kicking US around.
the trick is....
NAG is the package favored for heavy-duty stuff where I work (finance) and MATLAB for general purpose use. All the PhDs I work with are too lazy to write their own FORTRAN code :)
It all depends... How much money do you have? Do you need answers fast? Do you need fast answers? Is it a learning experience?
I think the obvious answer, to a point, is use the right package for the right situation. But that implies you can purchase as many packages as you want and that you want to learn to code in any of them.
My preference is to go with something like Matlab (which is what I use) for most of the work. It is relatively fast, not too expensive and does everything I want. It is extremely simple to code things up. I also use Mathematica for symbolic processing, but no real reason why I use that over Maple.
So, it really seems it comes down to the (obvious) question, What do you want to do with it?
C
As a compiler researcher, lp_solve is all I need.
s bbminPERLth\nb.s xmix\u$&x.s dMidMad.s yPERLyjunay.print
Well at least that was the slogan of nearaly all the freshmen at my school who took any form of calculus, as we all had to learn (or try and figure out how to ge the TA to do it for us) Maple. Now that I'm a little more familar with programming it's not so bad, however back then Matlab would have been without a doubt more prefered, as it was much more intuitve. However, the school was getting a big pay off from Maple (one of the founders or key programmers wrote the damn thing) to teach it. Finally my senior year the Matlab people came to campus and got a huge petition together. Both softwear apps are now available on campus, but I'm not sure if they are both taught... I guess if you want more people to be able to go back and manuipluate yer data, I'd use Matlab...
I am not able to articulate this well, but the type of research you are doing is MUCH more important of a consideration than computation speed or resource consumption. If you need supercomputer time, then you had better ask the admin what you need to use. I know a bunch of people that do environmental modelling, and I have never seen or heard of anybody writing their own C++ to do it. Researchers GENERALLY have better things to do than re-invent wheels.
People who think they know everything really piss off those of us that actually do.
As an undergraduate studying math I have used Matlab, Mathematica and GAP to some extent, but mostly to verify work already done by hand.
For most computer vision code, Matlab is a must for prototyping. It's useful in other areas, and, if you know how to use it, reasonably fast. If you're doing particularly involved matrix manipulations, it takes a lot of work to come up with C/C++ code that will work faster then well-written matlab code.
Personally, I also use Mathematica for doing real math work. If I need to derive something that's particularly complex, then Mathematica's notebook style is really nice to work with, and it makes possible extremely clear and concise mathematical arguments while limiting stupid human errors when doing drudgery like taking derivatives and the like.
I hear Maple and MathCad are both good, too, but I've never used them.
It depends on the task. Recently I've had instances where I need to do statistical experiments and data analysis, vector field visualization, and general testing of algorithm parts. In terms of the statistical side of things, I usually code up things in Fortran 90 - it's an array language that is just good at doing things with time-series style data. For visualization, Matlab is very good for experimenting with things, although I usually code up C and OpenGL for things that need speed. For testing algorithms, Mathematica is the way to go, although coding an algorithm up in Matlab is very nice if you're porting to F90/95 - the languages are very similar.
It's been my experience that most folks tend to focus on one package for their work. Commonly it is Matlab or Mathematica it seems and each package has its strengths and weaknesses with Mathematica being the better choice for symbolic math while Matlab is used more for building applications to perform specific tasks. Mathematica is a favorite of mine and works well in solving problems related to applied mathematics.
For a couple of reviews of Mathematica, see Applelust Scientia
Visit Jonesblog and say hello.
I'm working on a thesis with a math professor here at school. We're working on a mathematical fiber model which requires a whole lot of computation and a whole lot of data. My advisor does all the computations by writing FORTRAN programs and running them on an SGI Octane. Yeah the language is really old an ugly, but it's still useful for mathematics and its what a lot of mathematicians use in academia.
my other penis is a vagina
Why isn't anybody modding down the trolls?
Mod me down. Please! MOD ME DOWN!
I used to dabble in MathCAD for undergrad. It was nice to use to lay stuff out and solve some things but it was a little cumbersome, if you ask me. I've now switched to LaTeX for printing out equations. I've ended up using Mathematica to solve things symbolically and Matlab to do my differential equation solving and plotting. I stick with Matlab mainly becuase I'm comfortable with it.. I'm aware that Mathematica and other programs can do the same job.
My experience (Ph.D. in applied mathematics, and employment at a mathematical consulting firm) is that researchers only use their favorite package and will rarely use anything else, despite the fact that their favorite may not be appropriate for the job at hand. To that end, I use Mathematica for nearly all my prototyping, except for brief excursions to Matlab which is much better at image analysis. But both of these have speed issues, and when it came down to serious buisness I would often roll my own C,C++ or FORTRAN code for the problem at hand.
I think this depends a lot on the kind of research you do. I do ocean modeling, and beyond the actual model code, which is written mostly in Fortran, the only packages I use are Matlab, Scientific Python, and an open source oceanography analysis package called Ferret. This is mostly because I don't have to solve any equations; all my results are based on number crunching. If you are doing theoretical work, and have to find polynomial roots or something, you use something different.
Actually though, I am trying to get away from Matlab more and more. It has some terrible features in it (Like a completely botched graphics library and a for loop command that takes EONS to run) and it costs at least $100 for a personal copy. Sci Py is free and does most of the same things, except that it has no standard plotting routines. At least, none I am aware of...
I am but an ignorant college student, so I'm wondering - under which circumstances do you actually USE programs such as Matlab and Mathematica? I'd be happy if someone could share some insight to me and possibly others like me by maybe giving an example. :)
i use matlab and GNU octave for most of my research. but then i deal mostly with matrices for which these are particularly suited.
however what matlab really is is a rapid development environment. it's great for quickly taking an idea you want to use and coding an algorithm from it and running it, but it's not super fast. most of the people that i know who are doing research may prototype in matlab, but then they almost invariably write their final stuff in FORTRAN/C because of increased speed and reduced overhead.
the program(s) you want to use are dictated more by your requirments, i.e. what sort of problem are you trying to answer and how do you plan to attack it.
-1: flamebait should really be -1: inciteful
Maxima ( http://maxima.sourceforge.net) is a GPL'd package that can perform a good subset of what Mathematica or Maple can do. Since all the code is available, you're free to examine it and decide whether to trust it or not. Given that it's been in use for roughly 35 years, much of its code is pretty thoroughly debugged...
In the years that I was working as a researcher at a company doing primarily mathematical based physical systems modelling, we used two languages:
1. IDL from Research Systems, Inc.
2. Fortran
IDL is alot like Matlab in that it is a scripting language with a vast library of common mathematical functions.
Fortran is fortran. There are *alot* of legacy sytems that depend on libraries written in fortran, and oftentimes most research development would rather call these libraries directly from fortran and not have to worry about the extendability of the code, thus they keep developing in Fortran. [Well, and its 'faster'.]
But I digress, the only mathematical code "librarys" that I used were from Numerical Recipes. Which is common practice among scientists that want a black-box type library for C and Fortran applications.
I like python and that other scripting language, PERL. I've been a mathematician since 1977, and the tools have developed quite a lot I must say. Although, really, what else do you need besides good ol' C++? As my youngest says, "Fo sheezy my neezy, its' the c-dizzy" Both of us like to hit the bong, a lot.
I like it because I've used it. But it does have very powerful DSP tools, controls simulation (Simulink!!!), ability to code anything you need or buy it, also interfaces to external device through the serial port (for example), and allows you to develop algorithms for embedded systems.
Never had to use it for much besides 36-hour suicide class project marathons, but it was reliable and easy to work with.
...
you're probably won of those who has yet to take the free visual studio test drive? damn you. damn all of you foems.
the source forgerIE will live on. there'll be no 'last post'. not in your tiny lifetime.
look for va.msn.?NET? (VAST)?
even more bull.
I study control theory at a university in Sweden and there we use MATLAB for a lot. When the speed of MATLAB routines doesn't suffice, we use MATLAB C-extensions (mex-files) and some commercial Fortran-based packages (e.g. NPSOL). Prototyping is very often done in MATLAB, where the built in libraries and matrix manipulation capabilities take you a long way before you have to do anything complicated on your own. Simulink (a MATLAB tool) useful for creating models of dynamic systems but I hear that Modelica is also used sometimes.
Basically uses MatLAB exclusively. Its very powerful, has a large user base, and has native components for signal processing.
It isn't very hard to learn how to use and you can get an academic version for a reasonable price.
I recommend it,
Rob
If not, do researchers write C/C++ programs and use GMP or Matpack to solve math problems?"
Writing a robust, efficient, and accurate numerical analysis library is not something you do in a weekend. There's not much to improve upon with packages such as LAPACK and their kin: They've been proven to be accurate and reliable over years of use. There's really nothing to reinvent.
I'ver personally used LAPACK for digital terrain matrix (3D) processing of satellite stereo images and the mapping of spherical coordinates to and from various "flat-plane" projections generated by the IKONOS sats. There were simply no other viable alternatives to LAPACK in terms of speed and accuracy, and we certainly weren't arrogant enough to think we could write a better numerical analysis program.
I do package volume analysis for one of the bigger shipping companies and when I first saw the headline, I thought I could finally install something and let it run and that I would never have to do the TPS reports ever again.
FINALLY! No more Package Analysis worksheets! No more sending out reports! Looked closer and saw what they were really talking about...
*sigh* Back to being a troll in a data mine....
-beacher
I personally like GiNaC for stuff like that. Basically the authors were in a similar possition, they wanted the power of C++, with the symbolic solving of Maple. It doesn't have every feature in the world, but it works for what I do. They've used it for research, although I haven't directly.
eat it you bastard
Just out of curiosity, anyone know what mathematicians, engineers, and phycicists would do in regards to these complex problems before there were these programs mentioned? What about before slide rules?
If brevity is the soul of wit, then how does one explain Twitter?
I have gone several ways on this question. Mathematica for symbolic solving, coding my own in C for mathematical modeling. But I did once use S-plus which is a fairly nifty matrix algebra system that might be useful to you. An open source variation is R
Although there will probably never be this OnePerfectTool that will solve all your problems, I tend to agree that some integration can be useful.
For example, one can get the symbolic toolbox for MATLAB and mix symbolic computations with numeric computations.
Similarly, if you are looking for a free alternative you may take a loot at Octave which has an experminal library linking it with GiNaC:
http://users.powernet.co.uk/kienzle/octave/
I personally really like the freedom and ease of expression of a good symbolic algebra system (I have used Maple before). But the truth it, they never have the performance necessary to do any real world computations.
Having traversed from a predominantly engineering realm (computer science) to a predominantly scientific realm (neurobiology), my observations have been that the tools are selected mostly on habit or previous knowledge rather than fitness for use.
The most commonly-used analytical platform is probably Excel (or some similar tool like Statistica), but the more serious researchers, who are also the more mathematically-aware, nearly all use Matlab in my experience.
When efficiency is an issue, nearly everyone I've worked with turns either to IDL (a Matlab competitor that has more arcane syntax, but much higher processing speed) or writes a C/C++ program by taking algorithms from "Numerical Recipes in C".
Recently, I've also seen a rising use of Visual Basic, especially to do experimental control (although some Matlab hooks do exist for such), and, of course, LabView. Some diehards use LabView for data analysis as well, but their results are suspect just because the tool is so poorly fitted to the task.
And, of course, many data collection hardware manufacturers (CED, National Instruments, TDT, etc.) supply scripting languages to control their hardware and perform rudimentary and sometimes not-so-rudimentary calculations.
The best researchers select the most appropriate tool for the job, but, again in my experience, it seems the selection is normally based on previous experience and inertia. Those who know a particular tool well (eg, Excel, Matlab, SPSS, Mathematica) tend to keep using that tool, even if it is not well-suited. This means you get abberations like Matlab programs that control real-time experiments and LabView programs that do higher-order mathematics.
Why?
Because the largest fraction of a scientists' time should be spent on data collection, not experimental implementation, and the amount of time (for nearly all fields except those with astronomical amounts of data) spent executing code is dwarfed by the time developing it. Clearly this breaks down for certain applications, but most of the science currently being done (read: molecular biology, and no, not bioinformatics) is not algorithm-bound.
Since data analysis is such a huge, broad field, I expect to see radically different answers from other posters!
Put my fist through my alarm clock with its ding-dong death inside my ear. - The Blackjacks.
While I don't do so much with it any more, in my university days I found Maple to be an extremely complementary tool to MATLAB. MATLAB is a powerful UI for numerical analysis, while Maple (Macsyma, Mathematica, etc.) are suited for symbolic manipulation of expressions. It's not uncommon for folks to (for example) derive differential equations of motion using a symbolic math package, then export the results to a numerical analysis package for simulation. I had very good success using Maple for this purpose with both MATLAB and EASY-5 for simulations of very complex systems.
As an aside, The Mathworks has attempted to create an integrated wrapper around Maple for MATLAB, but the versions I used always felt clunky and bolted on.
I use Maxima for my work. It's a continuation of Macsyma, the computer math program that was the inspiration for Mathmatica. Macsyma was tied up in copyrights for a while, but now it's public domain. So Maxima updated it to modern computer environments, added in a GUI (with web browser) and ties to modern programs like GnuPlot, and now there's a good, open-source symbolic math utility / programming language.
If you're doing particularly involved matrix manipulations, it takes a lot of work to come up with C/C++ code that will work faster then well-written matlab code.
I'll admit to limited experience with matlab but I find this very hard to believe. My undergraduate computational physics was taught with matlab but since I was learning C I chose to write all my programs in C (ah, Turbo C 2.0 -- now _that_ was a good product).
I was no C wiz, and of course the other students weren't matlab experts, but there was orders of magnitude difference in execution speed.
Perhaps matlab has evovled a lot, or what you are doing has few enough iterations that you don't notice the difference, but I'd guess anything that had lots of iterations would quickly show a marked divergence in execution time.
Are there any viable open-source solutions to either Mathematica or IDL?
Asking this question is no different from asking, "which programming language should I use?" without stating the purpose. Bash is great for scripting a daily ftp get, but inappropriate for drawing graphics.
I can use Mathematica for almost all of my dabbling. Sometimes I play with MuPAD, R, GnuPLOT, Octave or Mathematica to show a particular problem. Since these are also free (beer or speech, depending on package) I can be reasonably sure that everyone can get a hold of it.
For example, Octave is suitable for matrix manipulation. It does everything that I need it to do and can replace Mathematica for me. It's also fast enough (the longest calculation has taken just over a minute but it was a huge manipulation of some graphic data).
I've dabbled with some of the libraries but only for fun.
I guess what it comes down to is how comfortable are you with the package. By the time I try to write something in C using a dedicated library I can most likely do the same thing in Mathematica in a tenth of the time. Even if the execution speed was 100 times slower, the "real" time may not about to much.
Wavemetric's Igor Pro is in general a far better package than the Matlab. It was originally just available on the Mac but has been available on the PC for several years now. It is quite powerful, particularly at curve fitting and graphing, and the built-in c-like programming language is very flexible. It can also be easily extended with your own c/c++ code. One thing it doesn't do is symbolic computations. For that you will have to with Maple or Mathemcatica.
It is used more by the scientific community rather than the engineering community. The only reason Matlab is used instead of Igor is due to inertia and legacy code in the engineering community.
I like c:\winnt\system32\calc.exe. It rocks!
I used lots of numerical methods related libraries from netlib.org back in the day. For symbolic manipulation (rarely important to me as I solved most stuff by hand anyway) I relied on Maple.
Another nit-picking EUian. Why do they do it so much? Dick-size / soverign nation envy.
You're talking about two different classes of software: "numerical linear algebra packages" and "computer algebra systems". Maple and Mathematica are the latter, Matlab is the former. I don't know about Magma.
Hardcore numerical programmers use LINPACK/LAPACK with platform-optimized BLAS (this latter is often commercial, or at least proprietary to the platform vendor) directly from Fortran. They usually use modern commercial Fortran 90 or Fortran 95 compilers, too.
On numerical linear algebra stuff where you aren't going to recruit and pay a Fortran programmer with a PhD in applied mathematics, most sane people use Matlab or GNU Octave or one of the many other Matlab clones. A lot of people like Numerical Python, if I had a big new project to do, I'd seriously consider it.
Yes, crazy "researchers" who don't want to learn Fortran and think Matlab is too slow or too expensive will write numerical code in C++. Some of them do fine work, too.
Excel and other spreadsheets are fine for small bits of numerical analysis, too. Don't turn up your nose at 'em, you can email your boss your whole analysis and he doesn't have to learn Matlab to do anything with it. Excel is also slowly replacing Qbasic as the computing lingua franca of the Amateur Radio/hobbyist-electronics community.
The class of people who just doodle out the singular integral equations for the airfoil design they're brainstorming seem to like Mathematica a lot. I wish I were more like that. Maxima is seeing a renaissance now that its licensing and distribution issues are cleared up (it's GPL now). I should check it out. There's also GNU (Emacs) Calc, which I use regularly as an RPN desktop calculator. It is actually much more powerful than that and will do all kinds of HP-calculator-style graphing and computer algebra with a liberal sprinkling of Mathematica-style syntax, but I don't use those features much, because they're wicked slow.
For a text retrieval / linear algebra project (latent semantic indexing, et cetera), I used Matlab for quick testing and experimentation. Then, when it was time to write some stand-alone code to accompany my paper, I used the GNU Scientific Library (GSL). In addition to its own operations, it provides an interface to CBLAS (C Basic Linear Algebra Subprograms) which are pretty useful themselves. I considered LAPACK, but the documentation seemed less accessible. Both LAPACK and GSL are based on BLAS (Basic Linear Algebra Subprograms).
For a non-research project (nautilus shell simulation for the Ball State University math department), I used Maple and the Geometer's Sketchpad.
josh
Why not learn a language to a level of proficiency that you can use it well and adopt to the problems?
...and if you're a non-programmer kind of guy, go with the flow - chose the language with the most support available - that way you can ask your way through....
Maybe math programming is different from regular application programming, but few developers switch languages until they're forced to (i.e. when they get a job that only allows VB in-shop, or such).
It's not the tools, it's the wielder.
Seriously, if you have to ask... maybe it's time you started to learn _one_ language well.
Civilization is the process of setting man free from men.
I would have to say LISP would be your best bet.
There are major several advantages.
Lisp
* comes with an console interpreter. Very handy for quick calculations.
* can define functions on the fly.
* can manipulate symbols.
And for a quick rundown:
CLICC produces compilable C code.
CLISP also compiles to byte code, but still needs an interpreter.
Lush allows inline C code!
You can find lisp bindings to do just about anything... especially in Lush
I'd boast more about how awesome LISP is but I've got a midterm in Real Analysis to study for, so just google it.
Fight or flight its all the same
Live to die another day
--Ryan
faggot faggot faggot faggot faggot faggot faggot faggot faggot faggot faggot faggot faggot faggotj 49rtjh0a4932wj 02a9ra0fj0d9s8fj asdfa9sidf dsf9dsf sd09fs0fkjw304j2 32 4234 24 3 akljdf a999dsfaspweorhqwnd,.xc9-99df -f df9723324js;a;
what faggot faggot faggot faggot faggot faggot faggot faggot faggot faggot faggot faggot faggot faggot
what 098009a8fu09ds8fg0asb89s0def89a09fejawlkfjsadv09a
Here go all my plans for my upcoming website, getting laid etc. CHEERS!!
Mathematics is not a plural. Thus, you don't need the "s".
Dave Gillespie's excellent emacs package Calc ignores your floating-point hardware and instead uses lists of integers to represent floating-point numbers internally, IIRC. And you can specify how many decimal places to remember; you want to compute something to 1000 decimal places, you got it.
(I would guess some other programs do this, too, but I'm not as familiar with them, since emacs calc does pretty much everything.)
I've used everthing for computational projects fro VBA to Fortran, as well as C, C++, and Java. It really depends on what your doing, what the end use is, and what your existent code base is. There are still a lot of peaple using FORTRAN, it ain't pretty but it works, the NAG libraries are pretty satndard, and very powerful, widely used in computational physics, CFD etc. For really simple and ad-hoc problems why not use Excel? it does matrix inversions etc, and is really easy to use. Also I've used C and C++, for math libraries you can get the source code from "Numerical Recipes in C". Also I've written orbital simulation software in Java, people may scoff but the clean OO features of Java make it great to work with and maintain, compile to native code for max performance. I started in comp physics 12 years ago, but the tools we have today are really incredible and we have tons of options, I guess its a tough call as what to use, everyone needs to use there own judgement, but at leat keep an open mind and look at all the new tools, API's etc we to choose from. Happy coding. Mark
The problem you are trying to solve, along with what personal libraries you have developed to solve other problems, define what tool you will use. Researchers, at least in Physics, don't fall prey to a large learning curve since they can pick up a new tool/language and begin using it very quickly. So, we choose the tool/library that can best describe the problem. If one doesn't exist only then would we build it from scratch using C/C++/Fortran. In the past I've used Mathematica, Matlab, Octave, Maple, locally developed algebraic programs, and IMSL w/ Fortran, but (in direct answer to the origional question) not at the same time for the same problem. Being able to state the problem in the tool is the real deciding point. One order of magnitude speed difference is irrelevant. Two or more is another story (hence the use of IMSL & C/Fortran).
I'm surprised you mention such a large difference in coding time between matlab and C/C++. I would think that if you have existing programs that do something similar it would be pretty fast to tweak them to do something slightly difference.
For green field stuff, however, I can certainly believe it.
Yeah, and I suppose "Econonomics" should be refered to as "Econs", right? Quit whinging, you daft wanker. Cheers.
I am a biophysics grad student doing Computational Neuroscience research. Our lab uses Matlab exclusively, and so do most of our collaborators here. In this field it is considered the standard, unless you are doing large biophysically detailed neuron models, in which case you would use Neuron or Genesis or some other modeling software.
The reason Matlab is used is because most things in Computational Neuroscience are easily implemented as matrices. Specifically, inputs and outputs are generally stored as long vectors, and connection weights are stored in large matrices. Matlab is ideally suited for this, because of all the functions available specifically for dealing with matrices. Also it is very simple to manipulate them - and the syntax to do so is very simple.
I have heard that a lot of computational biology people use matlab for their modeling. Those that require speed just code in matlab and then compile it in C.
If you want an idea of the kind of research we do with matlab, go to our lab website at:
http://csn.beckman.uiuc.edu
I am a grad student in physics and I use a number of different math languages. The first language I ever learned was C so this gave me a natural disposition towards Matlab. Matlab is very powerful and allows visualization options that I do not know how to code in C. Concepts like vectors and matricies make Matlab very useful in data analysis.
Recently in a research project we came across a problem that someone else had solved, but in IDL (another math package). In moving our work to IDL I found that Matlab and IDL had many of the same functionalities, just different syntax. Sort of like starting to program in fortran after learning C. You know how the If...then statement works, you just don't know how many tabs to put before the arguments or were you left your punch cards.
As a student I love Mathematica. No more integral tables or special functions tables. The power of mathematica to do 19th century computations is unparalleled. But I find using it for data analysis difficult.
So my recomendation is the same as if you were going to a foriegn country where many languages are spoken. Pick the most popular one, or the easiest to learn, first. As you want to do more learn more languages.
I do lots of geometric work and I depend on vector math.
If I'm not concerned with speed, Python is very nice as I can reuse a module package I wrote that contains my most often used functions. Additionally, the fact that Python is OO is also very helpful.
For speed, such as when I do 10^12+ math operations, I fall back to C. Nothing crunches numbers faster.
Python and C. They're not just for breakfast anymore.
Graham
Linux - Fast Pane Relief
SciLab,
the healthy open source alternative. (tm)
Might not have all the features but looks pretty decent.
Malike Bamiyi wanted my assistance.
I use MATLAB every day for my neural network simulations. MATLAB is incredibly powerful, incredibly flexible. It is also incredibly expensive. And the decision to port it to OS X was about the best decision The Mathworks has made recently.
MATLAB offers student versions for about $99 a pop, which is dirt cheap considering its $1000 price tag for the retail version. Many universities of course have dramatic discounts, but then, you have to have be affiliated with a univeristy. Even the student version requires you to attest that youre using it for course work or student-level research and not commercial gain.
MATLAB has a number of drawbacks. Price is the largest. To enforce its license, MATLAB requires you to run the onerous and clumsy FlexLM license manager. FlexLM is brought to you by GLOBEtrotter....a division of that bastion of consumer rights, Macrovision. That should speak volumes. The license manager makes doing a lot of simple things stupidly difficult, especially if you're (like me) mobile and have to authenticate with a central server running the license manager. I can get into details if people have questions.
On top of that, MATLAB requires a yearly "maintenance" fee. It's more or less software as a service. Apparently, if you let the maintenance contract lapse, you can still use MATLAB, but you get no more support and cannot apply any new updates. That may be, but the particular license my university employs will cause my copy to simply stop working after April 1 if I don't renew. (April 1 being the beginning of the Mathworks license year. I don't think they see the irony in choosing that date).
The maintenance contract does not apply, AFAIK, to the student version.
On top of THAT, the student version or the $1000 base retail installation just gets you the MATLAB core. Which, granted, is extremely powerful. But the Mathworks also has a couple dozen or so Toolboxes, each with a range of specialized functions and tools (i.e. Signal Processing, Image Processing, MATLAB-to-C Compiler, Symbolic Math, etc. etc.). Each of these comes for an additional price, and its own maintenance fees. IIRC, these are like $500-$700 more each.
Did I mention all these prices are for licenses on a per seat basis? Any institution or company thinking about MATLAB is going to shell out serious bucks for the privelage.
On the other hand...MATLAB is a serious, extensible, highly flexible platform for technical and mathematical computing. I find that I can prototype programs for solving scientific problems in MATLAB far faster than I can in any other language. And its visualization features are truly impressive...even if the Handle Graphics system it uses is SO DAMN KLUDGY to program. You can customize visualizations just about however you can imagine...ALTHOUGH, some simple customizations are going to be UNNECESSARILY tedious to program.
Another drawback to programming in MATLAB is speed. MATLAB ("Matrix Laboratory") is exceptionally optimized for handling calculations of very large matrices. However, because it's interpreted, if you have any loops, it's going to be very slow going. There often many tricks to "vectorize" operations you'd normally do iteratively in other languages, but often the only solution is the ol' for-next or while loop. These are slow. Very very slow. Yes, there's a compiler, but in my experience the compiler isn't that great at optimizing code...and, did I mention it costs extra?
Anyway, MATLAB is amazing in its breadth and depth of power. I haven't even touched on its capabilities for engineers, like the SimuLink system design simulator, and hardware interface toolboxes. I can't imagine a problem needing to use a "mix" of math packages (as the original poster asked) if you're using MATLAB. But the purchase and ownership costs are very steep.
I have a related issue, in this regard. Some of the problems I am working on require arbitrary precision floating point numbers. E.g., one number might be 3.2334, but it needs to be multiplied by 3.4568902349830983945873908730987578439345, and I need all the resultant digits.
The problem is that the output of one calculation is fed into the input stage of another, that output being the input of the first calculation, in a circular style, so that small rounding changes may have a large affect on the final outcome.
Now, at some points, the precision may be truncated (where the effect will be unnoticable to the equations), but at certain points I need the exact number.
I have heard that with Lisp you can have numbers as large as you like, but I don't know how hard it is to perform complex numerical tasks in Lisp. Also, speed is an issue (I want it to be as fast as possible).
Any suggestions as to how to accomplish this?
In the past I've used Matlab, C/C++, and a junkyard of Perl scripts to get things done.
Nowadays I use exclusively Python, with underlying C and C++ components when performance is at a premium. C is easy to call from Python thanks to Swig.
Python is simply unparalleled in its simplicity and elegance, and I find that I can accomplish most of the things that Matlab is good for from a Python interactive shell using Numeric and the other various scientific Python libraries.
Then don't talk to Americans, go somwhere else and spray.. MM
I'm a post-doctoral researcher at a engineering college and I use Linux for all of my data acquisition and analysis. The following environments are used:
LabVIEW, PERL, shell scripts, and/or C for data acquisition
C++, MatLAB, and/or shell scripts for data analysis
and you can get some of my codes from Sourceforge:
http://sourceforge.net/projects/qaxa
http://sourceforge.net/projects/ssnooper
and others are available by sending me an email.
Ed
http://cesep.mines.edu/people/hill.htm
TK Solver
I have been using matlab, mathematica, maple and mathcad for different purposes in university and currently in job. I feel matlab by far is the best of the bunch simply because it allows for a more powerful simulation experience using simulink. Here is what I feel about learning these packages vs. coding ...
... maybe its better now ...
:) ob' it may not stand the test of u'r research !!!
1. matlab - hard on newbies' but very powerful and elegant in the hand of intermediate and advanced users. Graphical simulations possible through simulink. Matrix computations are very fast!! and on average it takes the least amount of time to solve the problems compared to mathematica, mathcad and maple.
2. mathcad - the first mathematical software I used, very easy to learn almost instantaneous learning!!! but that was when mathcad was still in dos mode, I saw the windows version out now and they seem to be cumbersome to get around, but then I have not been using it regularly.
3. mathematica and maple - almost similar performance, mathematica has better interface and with a large amount of tutorials and extensive help system is easier to learn than maple.
4. scilab - a matlab clone which is GNU (I think!!) used it couple of years back when it was not as good as matlab graphically
Now, coding - yes it has to be done from time to time but I think due to these softwares it has been relegated to the sidelines when extensive run times are involved and a significant performnace gain can be derived by days of coding. I belive it may be easier given the tons of free libraries available but it still takes longer to code in c/c++ than in a 4GL (generation language) like matlab and mathematica.
Coding still can't beat the quick prototyping mode of these softwares i.e u can do a lot of manipulations in the time u take to write and debug the code. It basically boils down to whether result or way of getting result matter most !!!
and then don't forget sometime those big screen scientific calculators are faster to get quick results than u'r fancy softwares and codes
Why purchase something when you can get it for free? Numeric Python and Python with SciPy have a huge capability. Thats not even considering all of the other add-on's for plotting and presenting data in Python.
The other major factor is that nuclear physics is perpetually underfunded and buying commercial software is ussually not nessasary (since we would have to make sure it worked properly anyway).
BTW we do use "building block" type programs and libraries for our interfaces. A good example is SpecTCL at the National Superconductiong Cyclotron Laboratory. I have used GTK/GDK in my applications, others have used Qt. However, the numbercrunching and datacrunching parts are nearly all custom. The data processing is simply too complex and too specialized to trust to prepackaged software. The numbercrunching applications are too time consuming to use a generalized program, everything has to be optimized.
Galium Arsenide is the material of the future, and always will be.
I usuall write binaries (since I do genetic algorithms/pattern recognition experiments) and then play with my data in Matlab (do some PCA to get the dimensions down, draw it up nicely, etc).
I guess the issue is that the major suites have SO many tools that, once you are used to them, mesh well with your way of thinking/coding/problem solving. In that way you usually find one tool and stick with it.
What is music when you despise all sound?
I was taught Matlab in my computational physics graduate class, which biases me toward Matlab in my own research. I also own Mathematica, but have not taken the time to master its language and command structure. Mathematica was an award at a conference where I presented a paper, but I purchased Matlab for myself.
There are two primary advantages which I see in Matlab. The first advantage to me is its abilities with matrices and arrays; it can do things in a couple of lines of code which can take some roundabout programming and subroutines in other more conventional languages.
The second is Matlab's graphical abilities. Display of data is very important, both in the final product (thesis, paper) and in the research process itself. After a brief introduction to graphing in Matlab, it becomes a trivial task to choose and use various display options for your data.
In physics, it seems that we stick with what works until something better is found. That applies to our theories and to our tools. It is not uncommon for us to use Fortran, Pascal, or even various types of Basic to perform simple calculations and experiments.
Much of what one uses may be determined partially by chance--what software package was available at your institution, what professor did you study under, did your undergraduate degree require a programming course? The work involved in switching from one major package to another, for instance from Matlab to Mathematica, simply seems like too much effort for very little sure return.
Jim Deane
...Haskell. See here for some advocacy.
Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.
It depends on what you want to do.
CHALKBOARD is great for addition and the other basic operations, but if you want to do symbolic algebra, Maple or MathCad are your best bets.
If you want to do some sort of signal processing and/or crazy matrix applications, the Matlab is probably the answer.
If you want to do something with statistics, Matlab or Minitab are the way to go.
MathForge is a project designed to utilize "web services" to provide interfaces to networked and local math tools. The idea being the mathforge architecture "discovers" math services depending on whatever task needs to be done.
The base of the project is a Java environment on which programmers can build tools as needed.
It is GPL'ed software.
Yes, indeed, the latest version (from less than half a year ago) was the first to include a just-in-time transparent compiler by default. Inner loops are so much faster than the old interpreted versions it's not funny.
However, a Matlab clone called MIDEVA had the same thing three years ago. Mathworks bought them out and incorporated their tech.
Yeah, for simple changes to the kernel -- that takes very little time in either language. But for trying something completely different, it's nice to have something like MATLAB with huge routines built in that one can mess around with. Once it works, you can go about coding up the routines you actually decided to invent/use. ;-)
"Owning a computer is like having your very own TV -- with a built in radio!" - Ed Helms
I am a pure mathematician, however, I use computers to do numerical simulations, and to assist in algebraic manipulation. For this kind of work it is imperative that whatever you are writing in, the language manages memory well and if... then... statements run smoothly.
Mathematica. Although the barriers to start using Mathematica are low, branching statements really slow it down, and its use of memory is to my experience inefficient.
Maple. It uses memory better than Mathematics. The barrier to use is quite high, because it has two heads, a Lisp like head for interactive computation and a C like head for programming,
the rules for evaluation are different for the two modes. This makes debugging hard. The front end still uses too much memory for some things.
MatLab. Vectors from hell. This is a great tool for engineering type applications, but for pure math it is too hard to get your conditional going and the data structures really eat memory.
C with libraries. After I get my act together using Maple, if I still can't get the big examples to work I use C along with math libraries, including the ones mentioned but also using
pari which does arbitrary precision arithmetic very efficiently. The advantage of C is that it is simple and... you are in complete control of what the machine is doing.
Hope thats helpful
...for the job at hand.
I'm a graduate student in Mathematics studying (convex) optimization problems so I see a healthy mix of pure and applied math. When I'm doing pure math the best tool for the job is a strongly symbolic math package like Maple (which I use extensively). Maple is also really good for quick visualization and helps gain insight and intuition into problems. Other offerings in this arena include Mathcad and Mathematica (however Mathcad actually uses a smaller version of Maple's symbolic engine).
Similarily, if the task is more numeric, Matlab is the choice (actually, we use Octave, which is a GPL'd and free numeric package that has Matlab syntax; most code written for one runs in the other). I'd say Matlab/Octave are most useful for prototyping numeric algorithms, and solving medium sized numeric problems.
Finally, when a tool is needed that performs well at one specific task (or the problem size gets really large), you can't beat writing your own tools from scratch in the compiled language of your choice. At this point, there are a variety of libraries that one may find useful (for arbitrary precision arithmetic, expression parsing, symbolic manipulation, etc).
So I guess the answer isn't white or black, but rather varying shades of grey (as is always the case).
I don't think anyone has mentioned scilab. It is a good GPL alternative (along with octave) to the expensive (expensive if you are a college student) matlab. It has been a while since I played with them alot but I found that matlab had the best graphing functions.
Anyway the best package for you in part depends on what you are using it for. Matlab, scilab and octave are great for doing linear algebra things -- manipulating matrices and arrays etc. Some people complain about how slow matlab is. I find matlab is pretty fast as long as you use it for what it was designed for. You should use their built in functions as much as possible and use as few loops as possible. If you find yourself using a lot of loops try writing a mex function in C or FORTRAN.
Maple and Mathmatica are great for Calculus differential equations etc. If you are doing a lot of matrix mulitiplies in Maple, you should be using matlab.
Mathcad is user friendly but it is SLOW. Even old people who have been doing insane integrals in their heads since the 50's and refuse to even look at a computer can see a Mathcad print out and tell exactly what the program is doing.
Hope this helps. Personally I like to use Octave and Scilab since they are GPL. Scilab is prettier IMHO but Octave is closer to Matlab (which I am already used to.)
Most research programmers use MATLAB, etc. for prototyping and verification. Those types of applications are very fast and concise but do not compile code.
FORTRAN is best for doing matrix calculations and it uses LAPACK, BLAS, etc. directly.
C++ is used frequently for its support of user defined data types. F90 does too, but who uses that?
If you have lots of money, use Mathmatica. If you are poor, use PARI.
I still prefer Matlab, but if I had to pay for licence by myself - I would utilize scilab more extensively:)
http://www.gentoo.org/dyn/pkgs/app-sci/octave.xml
Think about yacas for symbolic computation and pari for some symbolis computation, high precision calculus with floats and number theory.
I'm suprised noone has mentioned Scilab so far:
...). This makes it very efficient to use to process raw data. You use to be able to download a complete working version with timed 7 minute demo mode. Lets you run the demos and try it out before buying. Highly recommended.
http://www-rocq.inria.fr/scilab/
The syntax is close to Matlab, but has slight differences. In some ways much more powerful,
and its free.
Another good commerical package is IDL (PV-Wave was another version of the same thing, I believe its owned by IMSL now). Although IDL is not as strong on signal processing as Matlab, it is very strong in image processing. It also has the ability to work with various data types (byte, short, long, float, double, comlex float,
http://www.rsinc.com/
A highly unknown but very efficient (faster than Pascal w gc) and easy to program is ML (Meta Language) Seems to be perfect for Math computation.
Haskell an implementation of Church's lambda calculus, a form of mathematical logic. There are compilers, which generate code comparable (within 20-50%) with c and a large number of mathematics packages. compare
Check it out!
I use Scilab instead of octave, there's no real reason for that, but it's great for writing small apps really fast, if you want to tryout any new ideas. Of course, you can do the same with octave and matlab. I feel that you can't really do that if you use Fortran or C. If I would need speed, I'd go for Fortran or C and Atlas or any other lin.alg. package.
Evolution of Language Through The Ages: 6000 BC : ungh, grrf, booga 2000 AD : grep, awk, sed
take a look at this page for some computer algebra software reviews:
http://math.unm.edu/~wester/cas_review.html
For CA, I use maxima and for numerical work,
I use the Numerical Python package or Octave.
I've run into a brick wall trying to find a good language that supports relatively large integers somewhat well as well...is there anything that handles these with relative ease? I'm talking around 1000+ decimal digits, and still allowing operations (add, sub, mult, div, mod) on them on x86 architecture to execute somewhat quickly. This would be a godsend for me.
It actually allows you to do without Maple or Mathematica quite nicely. It is free and it has a great community around it. Not a few puny hackers but actual researchers who have been doing these things for decades.
For my projects (particle physics etc) I generally use C++ these days (farewell fortran) because of the usefulness of templates. Recently I had to use some largish matrices (1000x1000 and growing - need more memory!) for a lattice calculation and found The Matrix Template Library to be most useful for my sparse matrices - and with an easy (well, easy for someone who knows STL) interface which allowed me to add a tensor product method - nice! The beauty of MTL is that it's just a series of header files - amazing! Then for data analysis I use ROOT an object oriented data analysis framework - it does histogram plotting / fitting etc... but is much more than a simple potting tool - you can build a cross platform GUI with it if you like, but the documentation is not the best. I've also used Octave for some FFT stuff too. It's like the unix philosophy really, use the right tools for the right job and use them together.
For example, you can write batch scripts in Maxima a lot more easily than you can in Maple. I have scripts to automatically generate PostScript figures and I'm really not sure I could do the same with Maple.
Maxima has some bugs, some annoyances, but at least, you can report them on sourceforge and they do get fixed. If not, someone will suggest a work-around.
I'm an experimental particle physicist, and most of the mathematics packages I use are home-brew libraries (mostly C++ w/ bits of older Fortran). I think for me a multi-dimensional function minimizer is just about the most complex tool used, and it is used constantly -- tens to thousands of times per day. Unfortunately, it's not a trivial problem and different minimizers will often produce different results. The only one that I know which is semi-free and basically functional is MINUIT, part of CERNLIB (in Fortran). I've recently been searching hard for an open-source minimizer to replace this, written in C/C++. I would also like to see one in Java, for a few reasons (I'd rather an applet than a CGI script).
The GNU scientific library has a very crude minimizer that's too simplistic for my needs (I want things like the curvature at minimum which can be inverted to give a coordinate covariance matrix). I most often use the minimizer to fit various functional forms to observed statistical distributions.
I am surprised at the lack of an up-to-date open-source minimizer, because so many university researchers use these kinds of tools, and are in an environment where commercial solutions are painfully expensive and a schism for any multi-university collaboration. A lot of phycisists write good code prolifically, but far too few support/contribute to open-source projects!
I was reading through Numerical Recipies recently, and was also taken aback by their licensing policies. The algorithms in the book are simple solutions which have been previously published by others in journals and such. And the code is just a direct adaptation (translation really) of the algorithm. Yet somehow their code, or any translations of it, are under copyright? I think it's foul-play like this that are the reason there are so many high-quality commercial mathematics packages, and so few open-source ones.
You can pretty much do everything you want using Python Numeric. It is actually a much nicer language than Matlab if you know your stuff as far as languages are concerned (OOP, functional programming and such).
Also, there is a port of Python Numeric in java (JNumeric) which means that Numeric is extremely portable.
All of that for free. Not just free as in free beer too... free as in free software...you can't beat that!!!
It works either way, mathematics is a field of mathematical sciences, therefore it may be plural. On the same note one can consider all of mathematics as a single entitiy and call it mathematic.
I'm a statistician and my field is the study of statistics, which makes perfect sense since I study a great deal more than one statistic. I also have an undergraduate degree in mathematics, and I consider myself to have studied a variety of mathematical sciences, thus I use the plural.
IIRC throughout history both mathematic and mathematics have been used to describe the study of mathematical sciences in the english tongue, so to assume either one is correct or incorrect is purely subjective with little objective merit.
When I come across a more specific problem that requires large arrays, I have resorted to using a combination of C/C++ code compiled on a UNIX box with the LAPACK package. This has been rare for me to do, the last time being about 3 or 4 years ago, but it was something that Mathematica could not due easily nor quickly. I don't want to reinvent the wheel, so if it happens that something is out there already coded, and I just need to tweak the code and compile, I will resort to that in place of Mathematica.
For quickie stuff, like generating a table of values to input to some kind of program, I tend to code something in either quickbasic for Mac, or something in C on a Unix box. If it is really simple, I will even use (gulp!) Excel. So, I use whatever will get that which I am trying to accomplish most quickly and efficiently. There is no one size fits all mathematical package/program/method for Physics.
Maxima, a descendant of Macsyma, is a symbolic algebra system in Common Lisp, with the endearing ability to drop down into Common Lisp in the middle of things.
It's very nice.
For my "Hello World" program, I use Matlab. John
unfortunately. We were taught it in one of our astronomy classes to analyze and plot data. It has a very arcane syntax and doesn't have a lot of capabilities (no matrices; there is a very crude way to represent square matrices as sets of vectors). I now use Octave or Matlab as much as possible for numerical work. For symbolic math, I mostly use Maple. I also have a little experience with Mathematica, but I like Maple better (although Mathematica looks nice). As far as I know Maxima, it can't do as much as Maple or Mathematica, but it should be good enough for most symbolic computations.
I've had fair experience with MathCAD and that's enough to warn you that MathCAD is NOT what you want. It crashes every opportunity it has, it is full of bugs, and in some versions there's even a nice little error message that pops up from time to time to say, "No Error has occured." Which, when you think about it, is actually quite useful since whenever this box does not come up... An error is probably occuring!!!
Comment removed based on user account deletion
You do realize the mex 'compiler' uses whatever compiler it's got to compile C right? I've used it before for particularly time intensive loops (there was a better then 3x speed up for that program) by writing the loop in C and then using mex-gcc to compile the code. I know it works with borland also, as I've ported that program to a Win2k box using borland's free commandline compiler. Use the mex -setup (I think). More details are on mathwork's site.
So, when's lunch?
First a global kind of classification.....
octave/matlab... are mostly vector/array oriented languages and are useful for doing work in problems that are suited for such - you can experiment easily, then recode in C,fortran... if needed. apl and j are also in this group and should not be ignored - though they're used a bit less frequently.
Macsyma/mathematica/maple/maxima/derive are symbolic math languages and can solve interestingly sized problems and get symbolic answers (that is, things like sqrt(pi/2)) as well as numeric approximations. This can be a very useful tool to have - depending on what I'm doing I use such things a couple times a week (nice to check results done by hand, or to handle all the crufty part of a solution). Most will emit fortran code which can also be useful.
vtk, opendx/khoros(?) are visualization tools - most of the other packages have some visualization tools packaged in them, but vtk and opendx both offer quite a bit more power.
Now the incredibly non specific recommendation
My suggestion is to pick one of each of these and learn it - do enough in it so you know the language/system well. Otherwise you'll be struggling with the language as well as with the problem - and finding bugs will be close to impossible.
If I put on my "computer science professor" hat (probably a wise thing if I'm to keep the top of my head from turning bright red with sunburn), I usually try to recommend that all CS students learn a smattering of these things as well. When you need one of these tools, knowing its there and how to use it can save large and wonderful quantities of time.
And now some more specific comments
On the whole my choices would be as follows - note the caveats - some of them are pretty cave-rnous (sic). I don't have piles of money to spend, so tend to prefer the open source programs just on that basis.
For array/matrix manipulation I much prefer APL or one of its derivatives (check out aplus on sourceforge). Languages in the APL family are also fun to program once you learn how. However the terseness of the syntax (and with APL itself the odd character set) tends to make these a bit forbidding, so a more popular choice would be octave (open source) or matlab. I've had good luck with octave - it seems to handle most matlab programs well enough. If you've got piles of money, go for matlab.
For symbolic math, maxima (sourceforge) is good. Its commercial cousin Macsyma has usually ranked as about the best symbolic math packages for accuracy and power and seems less expensive than the others. Actually writing programs in either of these requires learning quite a bit about the innards of the system though. My second choice for symbolic math would be Mathematica - its programming language is well integrated with the system as a whole and and for general goodness and niceness of the interface it can't be beat. (The other commercial products are building on the best parts of the Mathematica interface - I've not checked recently, but they're getting much better fast.) The visualization capabilities of Mathematica are also very good. Maple is probably the most popular, so using it will probably make it easier to find someone to help you, but on the whole I've just never found Maple as easy to program as Mathematica and I tend to want to program almost everything.
For visualization both vtk and opendx are very nice systems. vtk is more aimed at a programming interface, opendx has a labviewish kind of programming environment. I like both and have both at hand. Both these systems are big enough that you'll want to make sure you understand them before you tackle a project with them.
They don't scale well, but spreadsheets can be very convenient for small models. Careful though, its easy to have errors even in middlin sized models that can be very hard to find.
Odd Zen Endz
As has been noted there are other systems, some smaller, some more specifically focussed on a single domain. Those tend to be harder to match to a problem - unless the problem is right in the center of the domain in question.
There used to be a program AXIOM which had a lot of nice features, but it seems to have gone to that Big Bit Bucket in the sky - but its base language "Aldor" is now available at aldor.org. I have a copy, but haven't looked deeply at it.
Sourceforge is also hosting a new project "lush" - which is a lisp system that has some integration of some of these features. To the extent that I've used it I'm impressed and will probably spend some time working deeper with it in the hopes that it will prove another valuable tool.
Mathworks (the owners of Matlab) has been aggresssivley increasing prices on Matlab while reducing licensing flexibility. All this started after they bought Matrix-X (can you say monopoly... I thought you could :-).
They heavily discount for Universities and students, because that gets you hooked. Matlab scripts are so cryptic, that the idea of switching to another package causes great fear and trembling.
I've also got quite a few gripes about the language itself. Yes, matrix aware languages are great; but there are much better implementations out there. Try Mathematica or Python/Numeric.
Do yourself a favor and avoid Matlab.
Just my $20.
this is an issue of highest importance! whick packages are known to be reliable, and which are known not to be?
Many linux drones use GPL as a synonym for "open source". But I don't think Scilab's licence would even pass the OSI's definition of "open source."
I'm a graduate student in Materials Science, and I'm a big fan of Mathematica.
It takes people a while to figure out that Mathematica uses a "functional" language, and not a "procedural" language,
but once you invest sufficient time, you can write the most elegant, easy to understand, easy to debug,
easy to modify code that you've ever seen. You can take three hard-to-parse C++ pages of code,
and reduce it to ten lines of beautiful code in Mathematica.
Plus the Help browser is the most useful thing I've ever seen in any program, ever.
The drawback, of course, is that it's slow, as with all interpreted languages, and thus can't compete with, e.g., FORTRAN.
As you've probably figured, there isn't one answer.
If speed (and being a black box) isn't an issue, Mathematica is probably the best symbolic math package (SciLab as free alternative) and MatLab the best numeric package (Octave as free alternative). MathCad gets honorable mention as very easy to use, but not better than either Mathematica or Matlab at either symbolic or numeric math.
If speed (and knowing what's going on) is an issue, there is enormous amount of freely available high-quality code (mostly in FORTRAN) on netlib. My modus operandi in grad school was to look for what kinds of algorithms existed in Numerical Recipes and then grab a good implementation from netlib and wrap the fortran with C.
If I were still doing scientific computing, I would do as much as I could using Python. It is obscenely easy to make Python modules (especially with tools like f2py) from existing code. The approach is to increase the power of the Python interpreter by packaging all that great freely available FORTRAN code in Python modules. The good news is the SciPy project (www.scipy.org) has already made great strides and you can steal their work. Better yet, make your modules available to the community and everyone benefits.
.. aka psychology we use Matlab for curve-fitting and implementation of localist connectionist network models. speed is not an issue, and we found Matlab to be easy to learn and teach, which is essential when in a non-technical area of research. (that is, people know nothing of matrix algebra and PC experience is limited to MS Office in most cases)[-of course, that's why we ARE working in the basement of nat sci]
C++ with overloaded operators. I'm sure there's a good bignum library somewhere.
I was in the math software industry for well over a decade. My experience is that each manufacturer is irrationally optimistic about their own package, and irrationally pessimistic about competitors. Kindof like commercial software in general, but the venue is more fuzzy, lending to more irrationality.
:-) It's designed to be interactive, rather than a programming language. Check it out at livemath.com
- the way a user does this or that, varies widely. Often, methods are not obvious, so for one person, "mathblob does gizzyggy calculations" is true, for another, it's false. EG mathcad has (had?) a version of Maple inside, but it was awkward and hokey to use. BUT they could claim all of Maple's capabilities.
- The algorithms vary widely. If MathBlob has a specific optimization for gizzyggy calculations with flipex inversions, then you could say that MathBlob is great at gizzyggy calculations, and the others are useless. These optimizations can easily give you 1000x performance improvement or more (think n^n).
- The domain venues vary widely. Numerical programs typically do zero symbolic stuff, but do the numeric stuff lightyears faster than symbolic programs. A group theory program may have trouble adding floating point numbers. With hardware double floats, you can't get anything past 10^308 or so, which is a disaster to some but no big deal to others. When someone says MathBlob does EVERYTHING, really they mean MathBlob does Everything that I think is important.
So like, I once had Mathematica take like 30 seconds to add 2 + 2. (It had to load in a ton of packages.) Then it reported it was out of memory.
With that said, LiveMath is THE BEST math program in the universe, way better than any of the others here.
(disclaimer: I'm the original author)
Marketing-driven companies end up over-marketing their products. Engineering-driven companies end up over-engineering
Believe it or not, our Researchers use a lot of FORTRAN. The mathematical products also commonly used here are SAS (v8), SPlus, and more recently, R.
Without knowing much about other data handling languages, I can say its most useful feature to me is the WHERE command. Want to know WHERE a variable is above or below some threhold?
mn_val = 100.
mx_val = 200.
i = where(var gt mn_val and var lt mx_val)
Returns the index of an array for those values. Seems simplistic, but is nonetheless invaluable for quickly filtering large data sets. Oh and it also has built in time/date function (great for processing time-series data!)
If you want to do some statistics, there's also R, a stats analysis package. It's very powerful, but it's designed for experts rather than non-statisticians who occasionally want to crunch some numbers.
Any sufficiently advanced technology is indistinguishable from a rigged demo
--Andy Finkel (J. Klass?)
Many will be served by reading a features and (speed) bechmarking report that I read a while ago from here: http://www.scientificweb.de/ncrunch/ncrunch4.pdf I have been playing around with Mathematica for quite a while, so by the time I read the report I was well aware that it provides lots of features and is great for symbolic work, and the former is borne out by this report. To me, the big surprise in the report (if you believe it) is that for number crunching work, Mathematica is bested by almost all the other packages analysed here (Gauss, Maple, Matlab, MuPAD, O-Matrix, Ox, Scilab, S-Plus). That said, I know that Mathematica has a protocol (Mathlink) that allows you to interface with your C/C++ code on most systems. This could greatly improve performance when used to implement, say, inner loops. That way, you can get a little of the best in both worlds. I am not familiar with other QPEs (Quantitative Prog. Environments) but I assume that they have similar interfacing capabilities.
Im a grad student in Aerospace engineering, and I frequently have to solve Computational Fluid Dynamics problems. I typically use three programs. For solving symbolic equations, i use Mathematica, For plotting and post processing I typically use Matlab, and for the actual calculations, I use Fortran 77. Fortran sucks for plotting stuff, and it cant do symbolic calculation. Matlab rocks at plotting, but is slow in the calculation department. It has limited symbolic calculation ability. Mathematica tends to be cumbersome in plotting numerical stuff, but it rocks at solving symbolic problems.
I spent a summer at the University of Missouri, Columbia working at the research reactor there. I remember my shock upon learning that all the code was in fortran, my only previous exposure to it have been from the jargon file. One of my jobs was to write code to control a sample changer (or rather to invoke the code for the sample changer and keep the samples w/the data), and they suggested that I write it in fortran.
That just felt so wrong.
So I talked to the staff programmer there and asked if I should take a fortran class. Lucky for me he pointed me at C instead...
This is what we use here:
Most non-numerical people use matlab, maple or mathematica when they want to solve a relatively simple problem. For bigger problems, in my experience it is easier and faster to just write (or get someone else to write) a C or C++ or Fortran program to do it, rather than use higher level tools, * unless the problem can be expressed particularly simply in mathematica and not in a general purpose programming language. I've only ever met one person who attempted running a mathematica problem on a supercomputer (although I know that people do this all the time): he basically ended up as an alcoholic dropout.
Only the old guys use Fortran.
Only misguided (IMO) people use C for anything big.
Libraries: I use GMP, BLAS (usually in the form of ATLAS), LAPACK, ARPACK, MPI, pthreads (OpenMP is usually a better choice, and nowdays has pretty good compiler support - unfortunately I wrote my main codes a couple of years to early). All of these are solid, reliable and fast. GSL looks good but I havn't used it.
Note though that none of the previous are actually C++ libraries. ARPACK++ is crap, most C++ linear algebra libraries are crap, the C++ bindings for MPI are crap, pretty much all existing scientific libraries in C++ are crap. However, some recent libraries have potential, such as the stuff on boost.org (eg, uBLAS), maybe MTL will end up being good but the existing release is not IMHO. Blitz++ is good, but the transition away from a single-developer project has been long, AFAICT it is still basically unmaintained. Pooma appears to be really solid and usable, but I've never gone beyond reading some of the web tutorials.
But, I practically never use a non-C++ library 'raw', I always put at least a minimal C++ wrapper. With careful use of templates, you can get some pretty nice looking (and efficient) code. This is especially important for Fortran. Apart from needing platform-dependent hacks to actually call Fortran functions, I havn't yet seen a Fortran interface that I actually like. Too many parameters, obscure, historical conventions, the dreaded "reverse communication interface" etc etc.
I also use xmgrace, recently figured out how to script it and that is a very powerful tool. I use Gnuplot for 3d plots, but I havn't really figured out how to work it yet.
I also use Perl a bit, but mostly for job control sort of things (copying files across before the start of an MPI calculation, submitting jobs to the queue, etc).
So from what I have read from most others' posts, there are two camps:
While I agree with #2, it does not really seem to answer the question. The question is: "Do researchers use only one or two packages for most of their projects?" I think the result for the most part is for mathematical calcs, the people that answered the question say most people use different programs for different goals.
Things to think about when you are trying to pick a language:
These are likely to be very similar questions a computer programer asks him/herself when they are starting a new project. Okay, this post really doesn't say anything, but one last note for the major commercial packages: most of them support C/fortran/etc calls so if you are truely interested in efficiency, remember coding efficiency matters too. I am finishing up my Ph.D. Years ago, when I starting simulations for my work, I started working in C. I figured "if I am going to be working on something for X years, I may as well do it right!" While a noble goal, I really didn't know C. I subsequently spent a week trying to do something that took me roughly 2 hours to accomplish the same thing in Matlab (another language that I had no experience in).
So what is the moral of the story?
run... run as fast as you can and don't look back.
And all over the place. There's really no comprehensive, encyclopedic analysis of the various packages and libraries. I wish someone with the time would do such a thing. I use Matlab and Mathematica, and for animations Maple or MathCAD, I have a fair understanding of math and software, and I still consider myself uninformed on the question.
Way back when Math::MatrixReal 's author was hard to find and I was submitting a patch as an exension because of that, Ilya Zakharevich pointed me to this:
Z /M ath-Pari-2.010201.readme
http://www.cpan.org/modules/by-module/CPAN/ILYA
I don't know anything about the PARI library, but google can correct that for you if you are interested in treatment. I'm just living with the ignorance.
Liberty uber alles.
Wanna hear something cool?
I just got Octave & Gnuplot running on my Sharp Zaurus. I can do my DSP type calculations, anywhere!
Someone is currently porting gtktiemu, at which point I'll have a TI-89 emulator, which will let me handle just abount any engineering math type stuff I need to do with one pocket-sized deivce.
Now if my fold-up keyboard would just show up.....
Life is too short to proofread.
There's always atlas, an open source platform-optimized linear algebra library with a BLAS interface.
And just because it came up in a different slashdot thread recently, I'll plug the debian packages for atlas, which are the perfect tool if your target platform is a heterogeneous x86 cluster. (Well, ok, it helps if the cluster is a bunch of Debian machines)
At UCLA's math department, the applied people have a QUIST related research program that uses Fortran77 and shell scripts, and C++ for various parts of their code to implement the Level-Set method to simulate the growth of thin films (atom by atom construction of electronic devices). The language choice seems to be due to legacy reasons: the grad student that started it so long ago used it, and the code has continued to grow ever since(ie. legacy reasons).
Although I wouldn't call it *math* research, here at MBI, bioinformatics programs run on the cluster *seem* to be written in C or C++ for the most part. I thinks it's more of the former because that's the interface for a number of bioinformatics libraries that we have licenced. Also, these things tend to be mixed heavily with shell and perl scripts; so the language is only for ease of integration with support libraries.
For most all of my undergrad work, I saw everyone use matlab, mathimatica, and their relatives for their work. In grad school, it seems to depend more on the class and the religious leanings of the mathematician involved.
There's a class on scientific computing that uses VC++ with fortran libraries from netlib (leveraged by f2c) solve some math implementation problem (tends to vary from year to year). Prof Anderson tends to by a junkyard warrior when it comes to math code generation. But then he's the mathematician's MacGuyver. (side note: Prof Anderson is a wonderful teacher and researcher - check out his page for some handy software tools and papers. Also, look at 270B for tidbits of linear algebra optimizations).
The benifit of matlab-ish programs is that you can usually implement your math structure quickly. The down side is that if you want to use any advance optimization then it near impossible. On the other hand, if you don't have a numerical analysis background, then many of the things you try to do to optimize your code in more mundane languages are probably going to be *much* slower then matlab, et al.
All of this is assuming you'r doing numerical analysis. If you're interested in abstract algebra , then I think you're stuck with maple. good program, but I don't have a review on it since I did most of my work by pencil and paper. I did use it for one of my crypto classes and found its implementation of Z_n groups very nice... although I ended up just coding it in C++ anyway :)
Also, check out the R project as it is GNU matlab.
"One man can change the world with a bullet in the right place."
- Mick Travis, "If..."
I do industrial R&D, and get to call myself a mathematician. The main commercial package I use is Mathcad; not because I'm particularly fond of it, but because other people I work with use it.
I find Mathcad strange. At first glance, it sounds as if its user interface ought to be just about perfect: you have an infinite canvas on which you can put text and formulae and so on, and it will leave the text alone and do what you ask it to with the mathematics. Cool. But ...
somehow it doesn't work out so well.
All that said, Mathcad is actually quite neat; when I have something to do that's basically about manipulating fairly small arrays, it's my tool of choice.
I don't do enough symbolic work to need Mathematica or Maple; my prejudices favour Maple over Mathematica, but they were formed quite a long time ago now and probably Mathematica has improved a lot since then.
For the rest: C++ and Python, with occasional smatterings of Common Lisp when my boss isn't watching. (One free Common Lisp implementation, CLISP, offers arbitrary-precision floating-point numbers. This is useful for diagnosing precision-loss problems.)
Well, some did anyway. For example, in the early 1820's, when dealing with solving partial differential equations arising from heat conduction, Joseph Fourier came up with the foundations of Fourier Analysis, which has become an essential tool in a great deal of mathematics, science, and engineering. Where would we be today if he could just plug it into MATLAB and get an approximate numerical solution?
Also, although I do not really know how he did it, I belive that Euler had calculated e to 7+ decimal places in the mid 1700s.
I have used Mathematica, Maple and Matlab, and I can state that my favourite is Maple.
Maple is an excellent tool for doing almost anything. It's also Canadian, so that's a small plus for me as well. (I am Canadian)
Mathematica is at par or a notch better than Maple, but the "Canadian" nature of Maple, plus the fact that more people I know use Maple so there is more help available pushes Maple above Mathematica (For now.)
I personally just found Matlab to be incredibly frustrating to use. I didn't like the interface at all, and I found it was way too slow, unlike Maple and Mathematica, whose interfaces are fast, clean, and smooth.
~ kjrose
All it has in common with the other 3 is that it starts with "Ma", I doubt most people have even heard of it.
Having said that it is an absolutely amazing piece of software for 'experiments' in pure mathematics. Group theory, Lie Theory, Algebraic geometry, number theory. I love it.
:wq
Don't forget LyME, a free Matlab clone for Palm,
which has just been updated. See
http://www.calerga.com
About keeping important bits of paper. I have MathCAD Pro 2000, and an upgrade to MathCAD 2001, both of which set me back nicely, (though I usually need Mathematica) and when I switched computers in December it was all useless because I can't find the serial number to my MC Pro 2000 disk.
I do chemometric analysis of spectroscopic data. When developing the algorithms I use Mathematica without fail; it is the most complete math program as it will do anything mathematical both symbolic and numerical. When I move to routine analysis I generally transfer the algorithm to matlab, but with the new, faster version of numerics in Mathematica that may no longer be necessary. When I move to very large scale theoretical problems, I port the mathematica code to C and call the standard LAPACK type routines. If I could have only one it would be Mathematica because it can do anything and they are improving the numerical speed.
Well,
It's not so simple.
As far as math packages go, matlab and mathematica are the most powerful; but they are very different.
Mathematica is by far the best for pure maths work (the only one real mathematicians accept--it can be slow compared to others but it does real algebra), whereas matlab has more in terms of data analysis, visualisation etc.
Maple is nice and easy to learn, but somewhat less specialised, and I see very nice thing being done in python, as remarked in earlier posts.
In particle physics, one useful data analysis package we have is root , which is basically a collection of C++ classes and a command-line c++ interpreter, very neat, very scaleable (works with our *huge* datasets)...
But on the whole I have found that we end up using a *lot* of different languages:
--you write your large projects in C/C++, and that's what the particle physics community is trying to standardise on
--interface with someone else's older code that's in fortran (a lot of it has not been ported yet.)
--you script things in python and shell, so you can run all of it in a sequence
--on a personal level, many people then use mathematica for the mathematical work (it's really unequalled when you want proper solutions.)
--you also find quite a few people writing frontends in java these days...
yours ever, fz.
The question "Mathematica vs. Matlab" was recently asked of Slashdot. The conversation was not very far-reaching but there's some good information in there.
There is a class of geometric construction problems that are impossible with a divider (compass) and straight edge. Basically, if you can do it with a compass and straight edge, you can do it with Euclid's axioms, so this kind of construction is a sort of analog approach to symbolic proofs.
One of these problems is trisecting an angle, that is, dividing an angle into three equal angles. The picture you just posted has nothing to do with this problem.
Another is "squaring a circle", that is, constructing a square that has the same area as a given circle.
People have wasted their lives trying to do these things.
Here's a link for the curious.
Squaring the Circle
Have you ever tried to build a pyramid without any significant digits. You kids have it so easy these days.
I wrote a book chapter that talks about using Mathematics for creating interactive signal processing documents. It's online at http://rvl4.ecn.purdue.edu/~malcolm/apple/inter_si gnal.pdf.
I also compare Mathematica to other tools.
- Malcolm
P.S. I still use Mathematica for derivations and documentation and Matlab for actual numerical work.
Axiom, a general purpose computer algebra system, which used to be commercially available, has been released as open source. It is in the process of cleanup and will be available in the near future.
It seems to be my experience that which math package you use depends partially on the task at hand and partial on the field you're in. For example:
Most physicists I know use and love MATLAB because it works with numbers (rather than symbols) and because of it's ability with arrays.
Mathematicians, on the other hand, really love MAPLE because it can handle some of the symbolic math.
Now, in astrophysics/astronomy, the tendency is either for IRAF (free software from the NOAO) or IDL (which, to me, smacks highly of MATLAB) because of their inherant image processing abilities.
Finally, I know a professor who loves Mathematica because of it's versatility. It might not be great at everything, but it's good at lots of things.
Almost 9 years ago as an intern as NASA Ames, I wrote a Common Lisp program that used REDUCE (written in some other dialiect of Lisp) to make algebraic manipulations; it called LinPACK (Fortran) to solve linear equations; it also generated and compiled Fortran code to interface with ODEPack and CMLIB. The numerical libraries are very robust and highly optimized. Some of them are individually optimized for each architecture: processor, cache size, etc. Matlab is based on public domain code. Mathematica and Maple always have problems mainly because hard math problems for people are even harder for computers. In general, packaged commercial programs are good for scripting and experimenting with small problems. But when you are ready to attempt a very large problem, you will have to use and even hack LAPACK, etc. to suit your needs. Every piece of software has its limitations. The real gotcha is that if you don't understand the math, the algorithms and the math co-procesor, you won't be able to determine the correct program to use and the accuracy of the results that you get.
I'm very interested in what you're saying in the post about multidimensional optimizers, because I do lots of statistics work, and have been recently trying to decide whether or not to write a program in C++.
I was assuming that I'd have to write my own minimization routines, but you bring up an interesting alternative.
I've never really looked much for general-purpose open source multidimensional optimizers. They must be out there, though.
A quick thought--I believe that the R language has a multidimensional optimizer. Of course, you might not want to do whatever you do directly in R, but R is open source, and you might be able to find the code somewhere.
Not particularly helpful, I know.
Does anyone else know of any good libraries for C/C++ or Java? So far the discussion has focused mostly on Maxima/Maple/Mathematica/Matlab.
I use Sysquake, whose interactive graphics are very helpful in understanding problems. Its language is compatible with Matlab.
mupad.de
I haven't used it much at all...but it handles both symbolic and numeric work. I have heard some people say it also handles parallel computation pretty well. It is free for use in academic research.
- the type of problem
- your skills, experience
- required accuracy
- one-time, versus repeated/production application
- computational complexity, hardware, time
- reproducibility
MathematicaGreat for symbolic algebra, symbolic integration, symbolic differentiation, symbolic linear algebra, nice looking reports, symbolic figures. Physicists, mathematicians.
MatlabMatrix/Vector-based: hence good for data-analysis, signal processing, numerical linear algebra, numerical visualization, experimental image processing. Interpreted (though compilation possible), hence good for prototyping, slow for large data sets or repetitive computation. Most recent version is Java-based, which is nice because you can actually incorporate Java objects in your Matlab code, but it's a bit big in the memory department. Cheap ($100) student version available. Used by electrical engineers, aero/astro engineers, occasionally physicists.
FortranAs opposed to the previous two, this is a language, not a program. Been around for a long time, hence used by many established researchers. Very fast for numerical applications. Actually faster than C in most cases, due to the highly-optimized FORTRAN compilers. While it is possible to achieve higher performance by coding in C, for a given computation and given time spent coding, FORTRAN will be less prone to bugs, faster, less lines of code. Many, many "recipes" exists for standard FORTRAN tasks. Used by physicists, mathematicians, applied physisicists, environmental engineers, structural engineers. Good partner for GNUPlot. Compilers are standard on almost all *nix installations, and starting is easy because that's all you need: no headers, includes, etc for most tasks.
CMore overhead than FORTRAN for same goal. "Closer to machine", i.e. can be faster if coded correctly, but also more prone to bugs. Compilers not as good as FORTRAN compilers, for numerical code, hence in practice slower than FORTRAN. Good if you also need to interface with hardware (i.e. data collection). Interacts well with other tools, for plotting and more.
FORTHGreat for symbolic math. Just kidding.
Personally I've used Mathematica for problem sets, Matlab for one-off/experimental/proof-of-concept geometric analysis of architectural models, Matlab for GPS-data analysis, Matlab and Java for database-based GPS prototype coding, Fortran and C with GNUPlot for Quantum Mechanics research. A friend of mine wrote one of the premier high-end structural engineering finite-element packages, entirely in FORTRAN. It's simply the fastest option for numerical computation. Caveat: as others have noted, the options may be entirely different if you're looking at specialized or old hardware.Where I work (an environmental science organisation) the emphasis is on getting the job done, whichever tool is approiate for the job, or whichever tool is familiar to the scientist gets used. (I'm not saying that this is necessarily the best policy, just what happens here.)
There are a range of programming competancies from people who take code written by someone else that they have always used and feed data through it black-box style, through to scientists who write their own F90 or C++ code with MPI and BLAS libraries for running on the HPC clusters.
We have OpenDX, Matlab, octave, IDL, Statistica, S, SPlus, R. Programming in F90, F77, C++, C, Perl, Python. The platforms include Windows*, Linux, FreeBSD, Solaris, Tru64. Some instrument makers use labview. You name it, someone here will be using it somewhere.
Quite often one person will develop using a particular package, then anyone s/he collaborates with will have to use the same package to read the files or run the programs.
I've been mucking about with python and Vtk.
Backups are for wimps. Real men post their data in comments and have slashdot mirror it
As a statistician, I prefer R. Matlab's approach to statistics is to implement a bunch of formulas one could look up - R (or S-plus - I prefer the open source version) gives an interface that is closer to doing statistics. R has far more routines implemented than minitab (or Matlab, if one sticks to statistics). Additionally, most of the interesting applied statistical research that I've seen is implemented in R.
Quack!Quack!.....QUACK!!
No, not java. J "is a modern, array oriented, high level, high performance, general purpose programming language. J is used in a variety of industries including banking, investment analysis, insurance, derivative trading, scientific research, and education." It's available for Windows, Unix (including OS X), and PocketPC. J has many built-in functions perfect for mathematics work. There are also several free books available for download to help learn it. You'd especially want to read the excellent "J for C Programmers," to become familiar with the J way of thought (it's most likely completely different than what you're used to!).
--
I romp with joy in the bookish dark
I use CERN's Colt library for java math stuff every now and then. It's pretty easy to figure out, assuming you know what you're after.
Interval methods automatically track all floating-point "errors". See GrafEq for an example graphing package that uses intervals: it doesn't produce incorrect graphs, even for tricky equations. (Not the case with Mathematica, Maple, etc.! They do give incorrect graphs on many simple equations.) See his siggraph paper.
I've done a lot of work in 3D pure mathematical graphics (drawing algebraic surfaces etc), and JavaView and Geomview are nice platforms for viewing 3D data.
There are four sorts of people in the world: fools, lunatics, idiots and morons. - Umberto Eco, Foucaut's pendulum.
As an environmental modeller (atmospheric chemistry) I tend to use FORTRAN90 for almost all major number-crunching routines (both modelling and data analysis). As I have been using F90 for quite some time, I have a decent library of my own functions and routines (like most programmers I imagine), some of which emulate things that C does much better, like string manipulation. I have found that coding in standard FORTRAN seems to be more portable across platforms than C/C++ (MSWindows, IRIX, AIX) with very little debugging or re-validation, although this is *possibly* due to me being less familiar with the latter.
I use a scientific spreadsheet program (Microcal Origin) to visualise the data or to perform small-scale post-processing, as it has a very decent scripting language (LabTalk - which is very similar to C) and v7 also allows actual C. I am told by colleagues that MATLAB is also excellent for this purpose (post-processing of data).
"Those who don't believe in magic will never find it." - Roald Dahl
You might also look at O-Matrix, (www.omatrix.com). Much faster and less expensive than those you mentioned.
. . .on an intel machine, nothing beats intel's Math Kernel Libraries. You can get a free trial version off the intel website (link here). The syntax can be somewhat cryptic, but the 1000+ page manual is very nice and they are BLAZING fast for matrix and vector operations.
:) I've also done some of that in python.
However, for quick alogorithm prototyping, matlab is the tool of choice around these parts.
- - - - - - - -
Don't worry, being eaten by a crocodile is just like going to sleep in a giant blender.
While doing my thesis a friend of mine and I used maple to generate C that we compiled into a .so that was then used by a custom app. best of both worlds.
--habit
Are you serious??!!! That's awesome! How fast does it run? I mean I know how fast the processor is roughly, but when it comes down to actually doing a calculation, is it noticeably slow? I have an HP-48G and it is brutally slow at doing some of the most simple things, and my Palm is also slow when handling large databases. The Zaurus has more juice of course, but is it enough?
Excel rocks (more so than your favorite OSS spreadsheet). It really is some good stuff for analyzing numbers.
atlas looks seriously cool. thanks.
CLN is truly impressive. I remember reading that it switches from one multiplication algorithm to another once you get past 10,000 digits!
The Debian project page for CLN is here
Don't use Mathematica, unless you want to actively sponsor stupendously annoying genius boy Wolfram to convice everybody he is the re-incarnation of Euclid, Newton and Einstein all in the one body.
Do what every good free software person does: use Emacs for everything, in this case symbolic or numerical math.
Try this:
M-x calc
(now you are in command of an RPN calculator)
M-x describe-mode
(for some very basic help)
m s
(now you are in symbolic mode)
(x+1) RETURN
Q
(i.e: shift+q)
result is:
1: sqrt(x + 1)
you just have defined the function x -> sqrt(X+1)
now type:
a i
Emacs asks you the integration variable, answer
x
result is:
2:3 (x + 1)^3:2
Type d B to get a nicer display:
2
- (x + 1)^(3/2)
3
Which is the primitive of sqrt(1+x).
Nice uh?
I would recommend Mathematica for any serious work. It has (is) a beatiful functional language that allows you to express problems very consisely. This contrast greatly to most other math programs I have used, where you can often still smell the Fortran-66 legacy, or have much less expressive power (i.e., Maple, which has an imperative Algol/Pascal-like core language).
On top of that, Mathematica has probably the best GUI I've ever seen in any program; with some practice and twiddling of settings you can produce high-quality mathematical documents that get close to (La)TeX typesetting. Furthermore, the amount of mathematical knowledge and algorithms that it contains is quite formidable (about on-par with Maple, I'd say).
One other language you might consider is IDL (http://www.rsinc.com). Just mentioning it, since I didn't see any posts (and I have been doing a lot of work-related programming for it lately). It's in the same class as Matlab/Octave/Scilab, i.e., it does numerical computations pretty well but cannot do symbolic computation. It's quite big in astronomy and earth observation, but I suspect that has more to do with community inertia than the product's merits.
I have used the IMSL libraries extensively in the past (only the fortran ones though). They are very efficient, fast, and easy to interface with and stick into your code. These libraries are quite robust as well, having been developed over a couple of decades. As a matter of fact, the original versions of IMSL included all the source code! Sadly, I don't think that is the case anymore....
Recently I switched to a new company and was unable to use IMSL, and had to scour archives looking for routines that would do the same thing. I finally found what I was looking for, but it took ages and was a bit cludgy. IMSL is definetly worth the money if you can afford it!
c
And for those of you who use a PalmOS device, try CplxCal and MatrixCal. That'll sort you for the kind of engineering problems you're going to do on a palmtop, anyway.
-- Waht? Tehr's a preveiw buottn?
I use MATLAB, because maple is a sub language of sorts within MATLAB. Lots of mathmaticians like Maple, because it is written for them, but MATLAB does everything that Maple does plus a lot more. To me, Maple just doesn't cut it.
My research is in atomic physics, and the data analysis routines we currently use are written in MathCad worksheets. While MathCad is great at (and easily readable for) simple integrals or sigma-summations, it gets very slow and incredibly difficult to read.
So difficult, in fact, that this past summer, one of our team members started hard-coding some of our more commonly used custom MathCad routines in C++ and compiling them into .dll files. This offered significant improvements in performance, between thirty and seventy percent increases in speed. Despite that, due to the vast amounts of data we need to analyze, it just isn't enough.
The real reason we had switched to MathCad in the first place was because some of our old C++ programs had become antiquated and we were shifting from UNIX-based to Windows-based machines; the ease of programming in MathCad won out over the performance gains of hard-coding. Now, that decision is beginning to haunt our research group, and I will be working on a new data analysis program, written from scratch, in C++.
The point is, for some applications, speed is essential. Case in point: with our old applications, a typical fit of data would require around 10 seconds on a 486. With our MathCad versions, it takes anywhere from 20 minutes to two hours, depending on the machines (currently Pentium 4 boxes)!
As a former mathematician I can state that I have used nearly all the packages listed in the question. Why did I use all of them? Because each one is better at doing one thing rather than another.
Want to make some pretty pictures or symbolic computations, use Mathematica. Want to take those pictures/graphs and rotate or manipulate them in real time (or Canada), use Maple (it originated in Canada and has an academic pentration there different from Mathematica). Want to do computationally intensive matrix work to arbitrary precision, use Matlab. Want more numerical control and flexibility to define adaptive grids or meshes, then write your own C++ or Fortran code and exploit the LAPACK libraries (hundreds of contributing mathematicians can't all be wrong!). Want to do complex polynomial manipulations over abritrary rings (you know who are) then use Singular.
It is just like fixing your car or doing any other chore: pick the tool that suits the job best. There is no universal tool that replace an entire tool box no matter what that lunatic Steve Wolfram says.
Solaristrum: One who has spent way too long staring at the Sun
I'm a theoretical physicist turned Wall street quant. I LOVE high level languages and have used lots of them over the years. The paradigm I have settled into is --
Mathematica for concept development, analysis, visualization, documentation and, of course, anything requiring symbolic manipulation.
The notebook feature is especially powerful. I now have thousands of notebooks with derivations, key formulae, past analyses, etc. I can do a system's level search on a keyword and pull up relevant work from years ago that I had completely forgotten. And that work is immediately reproducible and extendible!
C++ for compute intensive tasks and objects:
Speed is a point here but the real gain is object orientation. After you have built up classes for your general areas of interest, the construction of code for a particular task is very easy.
I generate numerical results in C++ and ship them to Mathematica for analysis via files. More sophisticated modes of interaction are possible but -- for me -- not worth the overhead.
As Feynman said -- it's the pleasure of finding things out.
tom.gladd@citigroup.com
When doing research in Physics, I used IDL, mostly on SGIs, which was quite nice. I searched a lot for free equivalents and found PerlDL (though haven't used it much) and GNUdl (again, didn't try it out seriously. I think it's gone...). I also tought Matbab but didn't use it much. Colleagues also used Mathematica a lot, the NAG Fortran library, their own C/C++ code, Numerical Recipes in C, and a bit of MAPLE and MathCAD (which is very nice!). For statistics, use R (cran.r-project.org) - it's very powerful. Octave is also a great replacement for Matlab. Above all, I found the most useful tool to be pen an paper (highly recommended). My father used a "slide rule". I think a long time ago people used a package called "an abacus". Anyway, best of luck!
It actually runs quite well. It's totally usable, although I haven't tried to do anything with really large matrices yet.
The Zaurus SL-5500 that I have has a 206MHz ARM processor, which is basically an order of magnitude faster than that inside a graphing calculator/older palm device. The Zaurus coming out soon (SL-5600) will have a 400Mhz Xscale processor.
The HP48G runs at 4MHz and has a 4-bit datapath. I imagine it is pretty slow. My TI-89 isn't very fast either. I think it runs at around 12MHz.
As far as a real benchmark goes, post an m-file and I'll tell you how fast it runs.
Life is too short to proofread.
Don't underestimate the power of C++: with type checking and overloading, C++ may actually be more convenient to use for many numerical applications that even something like Numerical Python or Octave/Matlab.
Beyond that, yes, obviously, all those libraries are in use by someone if they are maintained. If you have the need to use one of them, you will know. If not, don't worry about it.
i'm a chemical engineer, and i'm working on a phd in a process control research group. as a result there is alot of process simulation and optimization. for the simulation stuff we use matlab exclusively. i would rather use octave, but my boss makes this decision. for solving lp and milp's we use cplex from ilog. i'm looking into gams right now for minlp stuff.
-- john
Especially if you're doing policy analysis (i.e., you're not data mining a 10 million record database) R is a great environment to work in. Hmm, it might be possible to process 10 million record databases with R, I just haven't tried it.
R has more or less equivalent functionality to Octave, but the programming language (S) is more interesting, and plotting functions are more sophisticated. For matrix operations, both R and Octave use BLAS.
My advice is to stay away from SAS and SPSS. These two were invented back when "everybody knows using a computer is hard". Both have GUI interfaces now, but that's just an attempt to hide the essential ugliness of their command languages. If you must use a commercial product then S+ is my recommendation.
Good luck & have fun!
That's a little harsh...
... it is now 2003. So yeah, if you want the latest stuff, this isn't it. That being said,
I read the review and mainly the criticism is that the books don't necessarily use the latest methods. Bill Press (one of the authors of NR) is an astronomer by trade and actually wrote the book/code in Fortran originally back in 1986. The second edition came out in the early '90s
if you're trying to develop something quickly and you don't mind trading execution time for development time, it's still okay for some applications. I don't know if I would say you were incompetent for using it, as I would say maybe you have a bad habit.
I personally had never heard of NetLib myself before this, so pardon my ignorance...
ocaml
Is there a good C++ (or even C) statistics library around ? I've looked for a day or so, and the closest thing I could find was GNU's Goose, wich failed to impress me after I spent an hour getting it to compile on rh8.
I was also hoping to use R library, but they dont' really provide much aside from the interpreter call.
Can explain how you do "package analysis"
maybe someone can point you in the direction
of usefull software.
You guys should try out J from jsoftware.com ...
:D
It was created by Eric Iverson, son of Ken Iverson who wrote APL.
Still where I live you'd get strange looks if you referred to maths as math. The same goes for talking about sidewalks when you see some footpaths.
Relax.
A nice combination is Matlab + Java. Current Matlab includes a builtin matlab VM (all the UI is in java), allowing matlab code and java to interoperate almost completely transparently. Considering that Java is moving up to C speeds it offers a great way to easily add high speed code to matlab as needed, with a relatively high level language like Java. Also check out Java Numerics page
I guess you skipped all the testimonials in that article.
It's been easy to find devastating critiques of Numerical Recipes for about as long as there have been search engines, and hell, I remember seeing flameage about it on Usenet back when it was new.
It's also real easy to get bitten by NR when you're green and someone who should know better shoves a copy at you and tells you to go code something. I suppose that's not incompetence on the victim's part, strictly speaking.
I'd tell my favorite NR-correlated-with-incompetence horror story here but it is completely unrelated to the point I'm making.
NR is fine for a lot of things, and it's not bad for a survey text (it's very accessible), but if you actually use the code in it, be sure that it is more important that your results are plausible than that they are correct. That's a tradeoff a lot of people make all the time...
Thanks much. I assume S+ is the same package that's often referred to as SPLUS or S-PLUS? Either way, R sounds interesting, and I'll be happy to try it out!
Libertarianism is rich wolves and poor sheep playing gambler's ruin for dinner.
because its a fairly decent Maple replacement.
:)
There is a windows version (by the original author), I believe a command line version, and a gtk+ port that is fairly decent.
I use Euler for my circuits class. I wrote a "Euler function" that reduces a matric into RREF form. Comes REALLY in handy for when the h/w is due the next day and I want to check of my mesh equations are correct
I've used various versions since version 1, and the one thing it hasn't been is buggy. Irritating, yes. Inconsistent, occasionally. Buggy, no.
There are bugs, obviously, but most have work arounds, and I've never been stopped dead by one.
As a general purpose mathematical program for use by engineers (note emphasis) that non-users can understand (ie as a COMMUNICATION TOOL) it is unparalleled.
I've a PhD in electronic engineering, and we mostly used MATLAB for quickly prototyping simulations. It was also quite widely used in industrial labs I have worked in.
.mex files also (mostly used to have to do this as MATLAB runs dog slow for some of the calculations I had to do, but you can also use it as a check against your own implementations.)
It's fairly easy to write your own modules and C and link them in as
Hi,
I'm a researcher at our bio medical faculty, working on bioinformatics problems. So we're facing all kinds of mathematical problems that need to be solved, in order to get sounder biological results. We use all kinds of thermodynamical simulations, over markov chain analysis and eigenvector determination up to heuristic optimization among many others, many of whose are implemented in a parallel biowulf environment. And for solving each of these problems a different computational approach needs to be designed and worked out.
When starting on a problem, it's usually our intuition trying to solve and prototype the solution in languages like Matlab. But as soon as these prototypes become slow or otherwise limited, the problem and our strategy to try to solve it is implemented in standard programming language to process our data, such as Python as a steering mechanism for parallel processes, C/C++ for CPU intensive tasks, Mathematica for symbolic problems, and so on.
I think intuition and experience with all these languages and their pros and cons are fairly important factors in choosing what language you will use for solving a particular problem.
So I guess there is no simple answer to the question "what language should i use?" You should start using as many distinct as possible, and use the one that you think is most suited for solving this or that problem, just as the choice of language is important in solving any other non-research problem.
--- Sigmentation Fault - Comments Dumped
Nickle is an interesting approach. Strictly numeric, but with arbitrary-precision integers and rationals, settable-precision floating point, convenient numeric I/O, GC, and much more. Plus it's a first-rate desk calculator. It's intended for prototyping numeric algorithms, among other things.
What else do you need than just Rascal?? Actually that system is a front-end for c/c++ code, making flex, bison-parsers usable for the masses.. :)
* Maple & Mathematica & Macsyma for algebra stuff and "simple" things.
* Matlab, Octave, IDL for analysis and plotting.
* Fortran77 (sic!), Fortran90 and C for coding.
If e.g. want to find the eigenvalues of a 1G*1G
sparse matrix.
* Many libraries is used: blas, lapack, arpack etc
see: www.netlib.org
* Parallell programming: MPI, OpenMP and parallell libraries as Scalapack and e.g SGI Scientific Library.
* Editors: Emacs (of course)
* Script languages to move data and some analysis stuff: Python, perl, bash , csh.
* xmgrace is great for 2D plotting.
* CVS is wildly used.
* And some cracy hacks as using Fortran to generate
raw PostScript code.
It's a jungel and it takes some time to find your way, however it's great fun! Happy hacking!
I hope you were not tryng to make a solid with al of its faces being regular pentagons. If Lightwave can do that, it's a much better package than I thought, cause it happens to be impossible.
If you add a handful of exagons, trouble is much less.
And you cannot trisect an angle too, with divider and straight ruler. Just numeric solutions for this one
Pick up some better tools than that. For numerical stuff, consider Numerical Python. For symbolic math, Maxima is probably still better, although it has a very steep learning curve; but I have rarely found symbolic math program useful at all--usually, a good change of variables makes the derivation simple.
I'm in civil engineering research and we do most of our stuff (mainly Finite Element Analysis) in Fortran (95) as it provides a nice bridge between the more mathsey Matlab, etc and the more hardcore c++,etc. It does pretty much everything I need it for.
The trouble with most accademic programming is that once the app is programmed, in whatever language, the results need to be visualised. In Matlab (and nodoubt other similar) Visualisation is relatively straightforward, giving good results quickly and easily. Wheras Fortrans graphics options are very limited and vairly complex, so it is easier to use an external visualiser, like AVS Express, which is very powerful, and makes viewing 3D data a doddle.
My spelling isn't bad, I'm evolving the language
Check out:. html
...@/
ftp://ftp-icf.llnl.gov/pub/Yorick/doc/index
This is an interpreted c-like language
that we have used in our labs for years.
There are a number of built in 2-D and
3-D plotting functions, and it is very
easy to use it to talk to various
instruments via the GPIB bus or serial
ports. It is also straightforward
to patch the binary (as in one command)
so that it can call your own compiled
C code from the interpreter. All in all
a very nice language and I highly recommend
it to people that have to interface with
instruments and do analysis at the same time.
Dear all, Magma is the most fanstastic program I've ever used. It enforces discipline in your approach to the problem initially which is rewarded later on. I strongly recommend magma as a choice for the up and coming maths programmer -- it will reward you with years of satisfaction, especially if you are a algebraist!
I havn't bneen able to find CHALKBOARD using a few search engines, it's too common a term. Anyone have a link to this software please?
zaphodbond@yahoo.com
We use Matlab a lot at my uni. Students can get the full Matlab (no student or demo version) for free. Our uni has a special agreement with Mathworks. If you take a course requiring Matlab, you sign a paper saying you'll use Matlab only for the duration of the course and delete it after.
And that's it; we always have the latest version with every addons possible.
When you start it, it says
This is a Classroom License for instructional use only. Research and commercial use is prohibited.
But everything else is the same.
Both excellent math tools
Running with Linux for over 20 years!
I first tried my hands on Maple back in grade 11. It was fascinating, to say the least, to see a computer program doing algebra smarter and faster than me. Before that I didn't know it was at all possible to do symbolic algebra on a computer.
:-)
Fast forward to my senior year, two years ago. I took a course on symbolic computation in my last term to satisfy the requirements for both of my majors at once. The professor, who was the author of the textbook used, was (and still is, I believe) one of the researchers working on Maple before it spun off as a commercial product. Besides the fact that I got 50 in that course and (obviously) didn't understand the topic all that much, to this day I still find Maple's capabilities fascinating. Of course, being in the University of Waterloo's Faculty of Mathematics, the birthplace of Maple, I was never given a chance to touch Mathematica.
As for Matlab, it is very different from Maple. My grossly overly simplified understanding is, Matlab is a fancy calculator.
IIRC, either some Versions of Maple contain a Matlab compatibility system that lets them run Matlab scripts or vice-versa.
I've dealt with Both. Rutgers makes heavy use of Maple, Cornell makes heavy use of Matlab. (With a few profs using Mathematica, for VERY valid reasons.)
From what I remember, moving from Maple to Matlab was not too difficult.
Where I work, people use Matlab heavily.
retrorocket.o not found, launch anyway?
Actually, now you can have the best of both worlds. Look at FrontMan which provides a common front end for Octave, Singular, Macaulay2, Yacas and support planned for R, Maxima, GAP, etc. It is in the KDE CVS repository under kdenonbeta/frontman.
I have been looking at a Java-based hybrid modeling package called Ptolemy II, which does signal processing, graph theory, and linear algebra. The code looks really nice; I'm planning to use it for realtime systems analysis. Any experience with this?
As an engineer who does alot of development, I tend to prefer matlab. It has a lot of power, and it has libraries that rely on Mathematica and Maple, so you have the functionality of those as well.
'don't stop the roX'
Look at the project homepage on SourceForge.
Most packages have an open, legible scripting language.
If the enterprise fails, you can translate your project to another package's language.
Matlab is legible by free Octave.
S-Plus is legible by free R.
MathCad files are illegible.
The product is moving to strict licencing overhead.
If they go out of business, you cannot reinstall or
move the software and you cannot translate your
worksheet.
Overflow - The way to GO! ;-)
Great for DSP design. Something between Simulink and SPW. A great graphical design tool!
http://freespeech.sourceforge.net/overflow.html
Petrus
lol bgs lol