I’m looking for a programming language that has Matlab’s
[ul]
[li]powerful linear algebra functions[/li][li] simple I/O with Excel[/li][li] forgiving variable declarations (e.g. vectors can be easily resized and refilled on the fly)[/li][li]plotting capabilities[/li][/ul]
but also has
[ul]
[li]portability, preferably in the form of executable files[/li][/ul]
I’m aware of several solutions that meet my criteria in the upper section, such as SciPy/NumPy (Python-based linear algebra packages) and Octave (a Matlab clone), but both of these require either Python or Octave installed to run. That is, I couldn’t make a program useful to a co-worker without requiring them to have Matlab, Python, or Octave installed. I’ve read about something called py2exe, but it apparently creates a bundle of files that must accompany the executable. I’m hoping for something more compact. I suppose I could also use Fortran, but (correct me if I’m wrong) that seems to be falling more and more out of favor.
So, those with occupations in science and/or engineering, what do you think would be a good work around here? Essentially, I’m looking for something that has robust linear algebra capabilities, forgiving variables, plotting capabilities, and software independence (doesn’t require any other special software to run once compiled).
That may be your best option, especially if you already have a significant amount of Matlab code. Fortran is still out there and not going away, but it’s definitely a more specialized language these days.
I might regret posting about something I know little about, but someone who uses both suggested R to me. It’s free and open source, but I don’t know if it fits all five criteria, although I imagine the first four at least. If there is no native support for the fifth, I imagine someone else would have built one at some point.
We use it a lot in my company specifically because, unlike MATLAB, one can generate standalone executables that can be run on a computer without IDL installed.
In the opinion of many, that’s about its only benefit over MATLAB. While the syntax is rather different, and array indexing is zero-based, it’s otherwise pretty MATLAB-like in what it does and how the environment operates. The user interface isn’t quite as nice, and while making attractive plots is possible, it’s a hell of a lot more work (the default is butt-ugly).
Requirement number 5 is going to be tricky. Any higher level language with dynamic typing and built-in plotting is going to probably require a virtual machine to go with it.
For example, I work a lot with R, but if you are programming in R any distributed program is going to require the R interpreter to be installed. There is a cool COM object with R (so you could say use it from C#) but again it requires R to be installed.
You could do something where you call the main R.dll to simplify your distribution but then you’d be programming in the language that R is written in C/C++ (you could P/Invoke from C# I’d imagine as well).
You might want to take another look at NumPy and py2Exe. We use py2Exe all the time to create standalone python programs (with GUIs in wxPython). You are correct that you’ll get a whole directory of files (that’s the python interpreter and supporting files), so you’ll need to create installers (mine are usually just self-extracting zip files). I believe py2Exe can create a “single” file but it is simply packing and unpacking that directory of files.
For your plotting there is the awesome combo of Python’s NumPy and MatPlotLib.