6 ms·
The comments here on Matlab have me intrigued. I'm ignorant and have a few newb questions. How does it compare to the APL family of vector languages (J/K/Q)? Ho
by gruseom 19y ago
The comments here on Matlab have me intrigued. I'm ignorant and have a few newb questions. How does it compare to the APL family of vector languages (J/K/Q)? How does it compare to Mathematica? What roughly are the licensing terms for commercial use (i.e. if you want to build a product with it)?
- carterschonwald 19y agoin terms of interface, it has more in common with mathematica (both good and bad) than do the APL style languages, basically the language semantics are C style with dynamic shape checking for array operations and a nice syntax for many different linear algebraic operations. It'd be nice if there was a nice type system to aid in getting comfortable with matlab's semantics, in my opinion
- tokipin 19y agoit's an algol language with array manipulation. APL languages start with array manipulation as a primitive in the design of the language, so they are much better at these sorts of things Matlab is for engineers, Mathematica is for scientists. Matlab is designed for speedy matrixy stuff. Mathematica uses a lisp-like structure 'replacement' pattern matching evaluation scheme, and intrinsically supports symbolic mathematics and is the the only language i would really call multiparadigmatic
- gruseom 19y agoThanks. My project is calculation-intensive and performance is important. I would love to use kdb. Arthur Whitney's work is stunning. Unfortunately, their licenses are draconian. Can you offer any insight about these various options from the standpoint of building a commercial product on top of them?
- tokipin 19y agotruthfully, i have no idea. it's certainly unfortunate that these languages/environments are not widely usable. i don't know of a more powerful scratchpad than Mathematica have you looked at R? it's an open source matlab. though i don't know what kind of database options it might have
- brent 19y agoR isn't "an open source matlab". R is an open source implementation of S-plus. If anything is the open source Matlab it is octave. However, I agree they can be used interchangeably for solving many problems.
- brent 19y agoPerhaps I can help, but first. What calculations are you doing (e.g. are they all linear algebra?) What language is it currently written in?
- gruseom 19y agoThink of it as similar to a spreadsheet. The calculations are mostly linear algebra and are represented visually in 2d arrays. What language is it currently written in Common Lisp (at least, the calculation part). It's a great language for developing the product, but we don't want to greenspun our own vector-based calculation engine if we don't have to.
- randomhack 19y agoI would suggest looking into NumPy/SciPy instead of Matlab. Matlab has a very good library for numerical computation but in my experience, Matlab is absolutely terrible as a language for anything except matrix stuff. NumPy gives you a good matrix syntax while building on an excellent general purpose language. Personally I felt NumPy is a lot cleaner and Python a lot more fun than Matlab though Matlab has many many "toolboxes"/libraries not in NumPy.
- carterschonwald 19y agoI second this sentiment. The difference in natural expressiveness is almost painful
- maximilian 19y agomatlab costs boatloads of money for commercial stuff. At least from my perspective. I wish there were an open alternative to matlab that was fast. Matlab is kinda fast if you do exactly the right thing, but its interpretedness gets in the way. Most of the people I know doing computational stuff write everything in c using some outside libraries to speed things up. Often they just code up all their own algorithms from scratch. Its lame, but they usually halve the computation time. I could imagine that SciPy and NumPy is much much faster than Matlab. Matlab is crazy easy to code for though. Its really handy for prototyping.
- llimllib 19y ago> I could imagine that SciPy and NumPy is much much faster than Matlab. SciPy and NumPy tend to be just about as fast as Matlab, when used in their default manner. When you drop into inline Blitz/C for your inner loops using Scipy though, you can achieve orders of magnitude improvements. Check it out: http://www.scipy.org/PerformancePython http://www.scipy.org/PerformancePython