Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Science

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."
This discussion has been archived. No new comments can be posted.

Spreadsheets for Scientific Computing?

Comments Filter:
  • Something else (Score:3, Insightful)

    by Goldsmith ( 561202 ) on Friday August 02, 2002 @03:55AM (#3997392)
    Spreadsheets are usefull, yes, but if you're trying to do something your spreadsheet can't handle, chances are you should probably not be using it.

    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.
    • Occasionally a "spreadsheet problem" has one or two bits which are really "math-program problems". Your straight-forward calculation can sometimes have a quadratic in the middle, and sometimes it's a quintic, while other times it is a quartic - and then you have to integrate the bloody thing. If the equation was constant, you could just do the integration on paper and plug the equation into your spreadsheet and get-on-with-it. But you can't, you have to somehow make Excel (or Gnumeric) integrate your polynomial. And I don't think that they can.

      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.

    • Just curious, but what do you consider a "hard" programming language, or at least one that would be considered "harder" than FORTRAN (from my point I certainly wouldn't say "C" because it is pretty much the same as FORTRAN---they just have different ways of looking at things)?
      • no one needs to remind you of brainfuck [google.com]
      • C is exactly what I was thinking of.

        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.
  • 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.

    • Well the things you mention, and it is also difficult to create and use complex mathematical formulas.

      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
    • OldMiner wrote
      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.
      Huh? None of the things you mentioned are handled badly by a spreadsheet, at least not in the numerical sense. Integration is simply a sum of cell data. Derivation is obtained by taking the difference of adjacent cells. While solution of linear systems is a bit trickier, many spreadsheet packages either come with solver engines or have scripting langauges in which a simple solver can be written.

      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.

  • by Dymaxion ( 7576 ) on Friday August 02, 2002 @05:17AM (#3997528)
    You want a program like Origin [originlab.com] -- a spreadsheet designed for scientific computing. While it's both very much not free and windows only, sometimes you just have to use the right tools for the job. A free or even just Un*x friendly replacement for Origin at its level of sophistication would be a very Good Thing. I'm hoping that there are other, similar software packages out there, but that's the one I'm most familiar with.
    • by fxj ( 267709 )
      There is Scigraphica (scigraphica.sourceforge.net)
      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.
  • The Scientific Applications on Linux [kachinatech.com] site has a few entries for spreadsheets [kachinatech.com] and many more for data processing and visualization [kachinatech.com].
  • The NPL [npl.co.uk] (UK version of NIST) tested a variety of software used for scientific purposes, some of the results are in Metromania 13 [npl.co.uk].
  • by clark625 ( 308380 ) <clark625@yahoo . c om> on Friday August 02, 2002 @07:58AM (#3997792) Homepage

    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.

    • Octave is a Free version of Matlab.

      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.
    • Spreadsheets aren't designed to be used in Scientific Computing (they are more suited to financial applications) -- there are other tools for the job that are explicitly designed for that purpose.

      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.
  • by sysadmn ( 29788 ) <{sysadmn} {at} {gmail.com}> on Friday August 02, 2002 @08:46AM (#3997919) Homepage
    Consider MathCad [mathsoft.com]. Back when I was doing control theory classes, the interface seemed much more intuitive. You 'wrote' a page of equations, plots, etc. and they were solved automatically. You could even write live reports. It was great for lab and homework writeups. The screenshots [mathcad.com] don't do it justice. Sadly it is not free, and is windows only.
    • I find MathCad really useful, even for day to day calculations. It supports units, so you can type in "5 mi/3 sec =" and ask for the answer in mph (or whatever). [If only NASA's Mars team had used it...]

      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.

  • Another possibility would be IDL [rsinc.com]. I believe that it is very similar in concept to Matlab (although I have never used the latter). It certainly works just fine on x86 Linux and there is even a version for Alpha Linux (although that is about to be discontinued), but it isn't cheap.

    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.

  • Octave is primarily used as a plotting tool, no? If for you the answer is yes, than by all means check out Scigraphica [sourceforge.net]. Scigraphica reminds me a great deal of the wonderful plotting packages like Stanford Graphics that I once used as a budding scientist. It claims to be aiming for the functionality of Microcal Origin [originlab.com]. I can't speak for its spreadsheet capabilities, but its plotting capabilities have impressed me more than any other GPL equivalent.

  • Try TK Solver [uts.com]. It is designed for solving simultaneous equations. I used it in college to solve some nasty problems dealing with internal combustion engine cycles. Back then it was on UNIX, but it looks like it is only Windows now.
  • 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.

  • I personally use and love both Open Office Calc, and MS Excell, but that's mostly for stats and financial data, which is their strong points. However, StarOffice 5 allowed you to create functions using C or C++, I can't recall which, its been too long since I looked at it. I don't know if its in the newest version but you might want to see if that meets your needs. It looked to be pretty powerful, more so than Excel's add-in functions. I was wanting to add Black-Scholes to it as a function, but gave up and just made it a sheet. Also Maple, once your used to the odd syntax of the command line, is excellent unless your doing lots of DSP type stuff, which Matlab excelled at. I haven't used Mathmatica, but everything I've seen or heard about it has been excellent, and I would like to try it if I had anymore heavy duty math to do.

"The four building blocks of the universe are fire, water, gravel and vinyl." -- Dave Barry

Working...