Spreadsheets for Scientific Computing? 41
redcliffe asks: "Sometimes it's much easier to create a spreadsheet to do some mathematical calculations for physics than to create a whole new program to do the calculations. It's also handy to be able to easily change one figure and have all your other calculations update. But there a certain types of calculations that normal spreadsheet apps like KSpread don't seem to handle well. Anyone know of a spreadsheet or something similiar designed for scientific computing? I've seen GNU Octave, but that's almost like writing a whole program, and without a GUI it's hard to learn quickly."
Re:Spreadsheets (Score:1)
Re:Spreadsheets (Score:2)
David
Re:Spreadsheets (Score:1)
I'm probably missing something, and I'm definitely biased against spreadsheets in general for most scientific work (MSME here, working with grad students daily on this sort of thing).
But given that most engineering/scientific spreadsheets have a format of:
I'm just not seeing the big advantage to it versus:
In the spreadsheet version, your variable names tend to be cell locations. In a program, you pick meaningful names.
The complexity of writing formulas isn't terribly different, assuming you're using a language with a reasonable math/stats library (Matlab definitely qualifies, and Python should, too).
Now a spreadsheet does have mind-numbingly simple graphing, as long as you don't get too complicated. But at least in Matlab, if you have a pair of row or column matrices x and y, it's plot(x,y).
Instant gratification in a spreadsheet isn't terribly more instant than (up-arrow) (Enter) in the shell or Matlab window mentioned above.
And neither Python nor Matlab compare in learning curve to Fortran or most other languages. You could likely be competent in either of them inside of two days.
See here [tntech.edu] for one example on projectile motion. The functions aren't required to be split out, but are good practice.
Re:Spreadsheets (Score:1)
Also, Excel's graphing package is awful (poor layout control, clunky interface).
Re:Spreadsheets (Score:3, Informative)
Re:Spreadsheets (Score:2)
Something else (Score:3, Insightful)
I suggest you use a program like Mathmatica, or program in Fortran or similar "easy" programming language. Spreadsheets are really only usefull in physics for data collection and mining on a small scale.
Re:Something else (Score:2)
Enter Mathematica. [wolfram.com]
Mathematica has an add-on available which lets you link to Excel, [wolfram.com] and link from Excel to Mathematica. You can send that equation over to Mathematica, have it evaluate it, and send it back.
I've never used this feature, but I hear that it's a real life-saver. Plus, Mathematica is one of the easiest math programs to start using, and one of the most powerful if you keep using it.
Re:Something else (Score:2)
i guess (Score:1)
Re:Something else (Score:1)
I think it's just that people have different impressions of the languages. Now, for all my talk, I can't actually program in C... so would I recommend it? Because I have been denied a (very nice) lab position simply because I have lots of FORTRAN and IDL experiance, but no C experiance. And it is highly recommended by my current employer that I learn C as soon as I can.
In a way... "hard programming language" isn't really my phrase, it's the word of the physicist who didn't hire me.
What don't they handle well? (Score:1)
This isn't going to be of any help, but I have a few questions.
I'm sure there are things which spreadsheets can't handle well. Off the type of my head I can think of derivatives, integration, and solving simultaneous equations. But I'm wondering what in particular you've found spreadsheets unable to do.
Further, you didn't mention a platform on which you are operating. I assume KDE running on Linux, since you mentioned KSolve. Are your restricting your search to this platform?
And, dare I ask, have you tried Excel to see if it provides functionality to do this built in, via macros, or via VB? Although VBA may not be great fun, it may allow you to do what you want without doing quite so far as writing a full program.
Re:What don't they handle well? (Score:2)
Well Linux is my operating system of choice, but I don't have huge objections to windows. Excel is no better for what I'm doing than KSpread though so I use Kspread. VBA is good, but I'm trying to avoid having to code to get this to work. Thanks
Re:What don't they handle well? (Score:3, Informative)
The one thing that I have found lacking in most spreadsheets is an easy way to fit curves to data sets. This is pretty glaring omission, given that you have both the data sets and a graphing tool in most spreadsheets. But then, I suppose that curve fitting is an alien concept to most of the financial world (though, I would think, statisticians might have some use for it).
A quick browse, however, through the Gnumeric Manual [gnome.org] indicates that it has a linear solver [gnome.org] and a host of statistical tools [gnome.org], which should allow you build almost any other numerical analysis tool you want.
Now, if you want to get symbolic results from a spreadsheet, you are probably screwed. But there are other tools [freshmeat.net] that are better suited to such tasks than spreadsheets.
Scientific Spreadsheets (Score:3, Informative)
Re:Scientific Spreadsheets (Score:2, Informative)
which might be what you want. It features spreadsheets, graphics and python as programming language. Another good spreadsheet is VisAD (www.ssec.wisc.edu/~billh/visad.html) which is written in java and jython and thus works on Linux AND M$-windoze.
There are several to choose from (Score:1)
UK NPL view on scientific software (Score:2)
Re:Excel (Score:2)
Rather than just leaving you moderated at -1, I thought I'd speak up and tell you why you're off topic.
The poster wanted to hear about programs for doing scientific calculations. You suggested that he use Excel to build a database. That's pretty far from what he was asking about.
I just hate it when people moderate my comments down and it's not entirely clear why. So I figured I'd speak up, why not.
Re:Excel (Score:1)
(My post was a troll/joke anyway -- I've worked in too many places that actually do use Excel to record important data in this manner.)
Matlab (Score:3)
A previous poster correctly stated that if you can't do it easily in a spreadsheet, you're probably needing another tool altogether. I would suggest using Matlab. Mathematica is nice, and so is Maple. And fortran's great if you want to push around bits, although C is used more by the engineering community.
Matlab's greatest strength is that it works magic with matricies. By using a spreadsheet, you aren't terribly far off from Matlab's strength, as I'm guessing that you've got several arrays. The matlab engine is also very robust and has nearly as many options available as fortran or C would. Can't beat that.
Re:Matlab (Score:1)
Re:Matlab (Score:2)
Even Octave/Matlab are programming languages, they aren't that hard to learn and are extremely powerful. In fact, I've seen people make spreadsheets more complicated than matlab programs.
Re:Matlab (Score:1)
I use Matlab, and although it has some niggling features, it is a good product. It is, however, expensive. GNU Octave is similar to Matlab, but it isn't as feature rich or as well tested. I haven't used Mathematica or Maple, but I hear these are also fine pieces of software.
In terms of a GUI, Matlab does have a GUI, but most of the interaction with the system is by typing commands (such as "mean(x)" which computes the mean of the values in x), or by writing files containing sequences of such commands (i.e. programming). It is very easy to learn the basics.
In scientific computing, GUIs aren't really "where its at" -- get over it, you'll be pleased you made the effort. That said, Matlab has a very easy to use feature that allows you to put together GUIs, so that you can make user interaction with your program easier (e.g. if you wanted to get an expert radiologist annotate a set of medical images and store and process the results using your program, this could be put together very quickly and easily -- there are, obviously, many other applications!).
Try and get some demos of Matlab, Mathematica and Maple, devote a day to each to do some tutorials, and see which one you like best.
MathCad (Score:3)
I'll second MathCad; not too expensive, either. (Score:2)
It also licenses Maple (or parts thereof), so it can solve equations symbolically.
MathCAD is also the cheapest program of its kind. There are free tools, but none of them have GUIs like MathCAD, and dealing with complex mathematical formulae is one place where a GUI can make a big difference.
You could try IDL (Score:2)
Most of my colleagues are Windows addicts who battle away getting Excel to handle huge data sets. I do almost all of my work in IDL and find that it works just great.
related to octave (Score:2)
TK Solver (Score:1)
KSpread is open source you know (Score:2)
Open source can always use programers who have an itch to scratch. Without knowing your problem I can't really say more, but it would be a good selling point for KSpread to be the only spreadsheet that can do what you need. A good way to take over from Microsoft is to do everything Excell does that people need, and a few other things that they don't do.
Other packages you named are also open source, pick on that is closed to your needs, and make it better for everyone. There are plenty of out of work programers (like me - hint hint) who would love to modify an open source program for money.
Star/Open Office (Score:1)