Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

MATLAB Programming Contest Winner Announced

Posted by timothy on Sat May 21, 2005 08:54 PM
from the cigars-all-around dept.
gooru writes "The MATLAB programming contest winner has been announced. It is a semi-annual programming contest organized by the MathWorks. What makes the contest truly interesting is the final phase is open source. Contestants may submit as many entries as they want and can tweak other entries."
+ -
story
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by Anonymous Coward on Saturday May 21 2005, @09:04PM (#12602601)
    The next contest should be to the death. Execute those who fail it. There can only be one. Then we'll see some real open source programming.
  • contests... octave.. (Score:5, Informative)

    by deego (587575) on Saturday May 21 2005, @09:09PM (#12602625) Homepage
    Contests are a great and relatively cheap way for companies to attract attention.

    While your attention is drawn to the non-free matlab, may I also point out Octave, the open source alternative freely (libre, beer) available on your machines.

    On debian, apt-get search octav to see octave and extensions. Don't forget to install the additions octave-forge, etc. to get near-complete matlab equivalence. In some ways, it exceeds matlab, in some ways, it doesn't. And it is very compatible with matlab.
    • On debian, apt-get search octav to see octave and extensions. Don't forget to install the additions octave-forge, etc. to get near-complete matlab equivalence. In some ways, it exceeds matlab, in some ways, it doesn't. And it is very compatible with matlab.

      Octave has also been ported to MacOS X, and is available via Fink.

      I agree, I have found octave *very* compatible; in my Quantum Mechanics class, we have frequent Matlab assignments, and I am able to cut/paste code directly between the systems, with
        • by deego (587575) on Saturday May 21 2005, @09:41PM (#12602766) Homepage
          > The problem is the vast libraries from matlab, which are simply not available with octave.

          did you install octavre-forge? A lot of Octave is almost like the basic engine in comparison to forge, IMO... forge is like the car build on top of it...

          See this page too:
          FORGE PAGE [sourceforge.net]

          and

          my links [gnufans.net]

            • > Damn.. I hadn't realized that Octave has grown so. It certainly does everything *I* need now.

              That link has menus for each broad field, from finance to statistics to image processing. There's also a "compatibility page" showing the (few) remaining differences between octave and matlab.

              Finally, (i said in another thread, sorry for repeating) don't forget to apt-cache search octav, to see other debian packages built on top of octave...

              * octave-forge -- most important
              * octave.*emacsen
              * octaviz
              * octa
    • Not libre, but also check out MuPAD. I use it quite often in addition to Octave when I tutor. MuPad and Octave do 100% of the mathematics required for Calc 1-3 and with some work, did everything I needed for other analysis courses. I can't speak to Matlab since I'm not a user, but the free alternatives, at least on the beginning calculus levels, are as easy to use as Mathematica. The graphical output is not as refined, but with Gnuplot and some (shameless plug) resourcefullness [digitalhermit.com] can do much of the same thing
      • > Care to name a few ways it exceeds Matlab besides being free?

        sure

        [1] I find matlab's "gui" "ide-interface" very annoying. I would much rather use emacs on my octave files.

        [2] Running octave from commandline is much nicer.

        [3] I don't have to sign an EULA to use it.

        [4] I can open the source file for any file in octave. I can't do so for matlab. Evem if I am able to do so in matlab, I have to sign another eula for that.

        [5] I can contribute improvements to octave.

        [6] Install time for octave was
        • And I was googling for scilab, when I came upon this thread, [google.com] which reminded me of a few points:

          [1] if you are a linux users, you will hate matlab's interface. octave's readline-compatible interface just rocks. your standard bash shortcuts works. you may think that is small, but That really is a huge difference to me.

          [2] excellent integration with the rest of linux, as you will see in the thread.. abiity to interface with c/c++ functions, etc. ability to pipe and be piped...

          [3] history mechanism.. (
          • Did I mention another disadvantage of doing business with matlab:

            * They will add you to their mailing list without you asking for it. If you raise hell about it, they will cheerfully point out how it is legal for them to spam you, since you did business with them. Will someone tell them that legal is not necc. same as ethical or even moral? IF it is legal for them to spam them, it is also legal for me to not do any more business with them.

            * The funny thing is, they then said that since I raised hell,
            • > I can't really see how a linux user would have trouble with all of this

              I don't have trouble with this, but with the missing features. C-a's working news is new to me, didn't know matlab has it now. But How about C-y to yank the selection, btw? Does C-k kill partial stuff? Does M- skip words?

        • Matlab can be run in a terminal, though not quite as nicely at octave (since it can't use readline). Furthermore, even in the workshop, you can set your editor to emacs rather than the built-in editor.

          Almost all of matlab toolboxes are written in matlab -- you can read and modify them as you need.

          I love octave, and use it extensivly, but Matlab is technically far superior, both in functionality and performance (most of the time), though octave tends to have cleaner/more flexible interfaces to the functio
        • A lot of these items are FUD.
          1) You can choose any editor you want to write your matlab code. You just need to run it in octave. Since octave has a command line interpreter, you can show the result with any editor that can display the results of a run command (emacs will do this, too)
          2) Yeah...it has readline, but that's about it.
          3) Poster asked, besides being free...this is part of the price.
          4) Not true. Any code not written in C, which is a good many of the numerical algorithms Matlab includes, have available source so that you can integrate the algorithms into any finished products (Matlab is for prototyping).

          Other than that, you're asking for more than is really needed to extend the functionality.
          5) Octave has a code repository. If they like what you write they use it. In other words, you can contribute to Octave.

          6) Your fault/FUD. It took me about ten minutes.

          7) I didn't have to. More FUD? Obviously this isn't a universal procedure.

          8) I've never looked at my License file. I never track what it's doing. This has never been an issue.

          9) See issue #3

          10) Is this even a reason?

          11) See issue #4

          12) Obviously you don't have very good reasons. I will present some good reasons after we get through this.

          13) This is true of Matlab as well. Try typing "ls" in Matlab and see what happens.

          14) See issue #3

          Having said all that, let me tell you why you should be using Octave.

          The biggest reason is the free as beer thing. Matlab+ all packages needed is astronomically expensive. It's a big deal. We're not talking Microsoft-who-sells-to-consumers expensive - we're talking big-contractors-who-work-for-Engineering-firms expensive. It's kind of like the difference in price between Oracle and Postgres.

          However, SOMETIMES it's worth it. As an Engineering student, I've tried and used regularly Matlab's image toolbox, Matlab's neural net toolbox, and their symbolic toolbox, and compared it to the normal canned algorithms.

          Matlab is very, very good. They put an extra polish on every algorithm they write. In general, they're better written, and produce more clever results than anything else. Keep in mind that I was dealing with underconstrained problems, so the issues where matters of estimation. Matlab got more accuracy or faster convergence out of it's canned algorithms than you'd get if you wrote them straight from the descriptions supplied by the algorithm's authors.

          Having said that, it's quite likely that there are certain areas that Octave will probably eventually fall behind. Symbolic work is one, I think, since their symbolic toolbox is actually an interface to Maple's symbolic engine, which they rent.

          Maple doesn't have the manpower to compete with the OSS people writing computer algebra systems. IMHO, right now it's about tied. Three years ago Maple was ahead.
          • 8) I've never looked at my License file. I never track what it's doing. This has never been an issue.

            You've obviously never deployed nor administered a site license for MATLAB. Talk about a ROYAL PITA. Your time will come.

      • > Unfortunately, its missing a lot of features I've grown accostumed to using in Matlab. switch...case and varargin / varargout were two that jumped out at me. It appears the functionality is provided, but not in a compatible way.

        hm, i use swictch routinely in 2.1.57. that list is probably a bit old. Octave currently has alot of features that are not documented in manuals one finds online, from sparse matrices to cells.

        my 2.1.57 does have varargin and varargout.
        • Well guess what? I'm going to have to say you probably are wrong. I personally don't use Matlab but I support those that do in an educational setting. Our department makes extensive use of Matlab, we use it for instruciton, we use it for research. Now research groups espically are always money hungry. They always want more than they have so they try to save as they can. We have many who use Linux rather than Solaris to save on hardware and software fees.

          None the less, we don't see Octave or Numerical Pytho
          • Its the same argument that people give that still use Fortran. Most (scientific) departments have professors that make extensive use of Fortran for research and in thier instruction.

            Its what the instructors learned originally and it 'can get the job done', but it is not neccesarily the best solution in whatever terms that you measure success. Professors use it because that is what they know. People don't jump all over new technologies because the original learning curve even if is 'superior, free and custo
  • by reporter (666905) on Saturday May 21 2005, @09:10PM (#12602631) Homepage
    Invariably, in contests of this nature, people are apt to draw specious conclusions from the results of the contest. In a recent programming contest involving teams of students from across the globe, the American teams performed poorly. Professor Matloff then rebutted the cries for government intervention to increase the quality and quantity of computer-science students [com.com].

    Now, this Matlab contest is positioned to lead to the same silly cries. So, allow me to present a link to Professor Matloff's excellent article [com.com] to head off any silly speculations about the decline of American technical prowess.

    • Non-sequitor - why would anyone in their right mind draw any conclusions about American technical prowess from this story?

      As far as speculation goes, I'd say that using a Wiki method allowing competitors to change other entries is probably not the fairest way to run a contest, although it is interesting.
  • by Anonymous Coward on Saturday May 21 2005, @09:13PM (#12602649)
    I guess for their speed programming award they are allowed to have prior source. If this wasn't the case, the author would have written it at 393 characters per second!

    I'm beginning to wonder if this was rather some sort of PR effort rather than a true programming challenge.
  • by schestowitz (843559) on Saturday May 21 2005, @09:37PM (#12602744) Homepage Journal
    All my MATLAB code is Open Source. And I am the most popular author (jointly with Luigi Rosa) this month. http://www.mathworks.nl/matlabcentral/reports/file exchange/top10Authors/ [mathworks.nl]
  • The Problem (Score:5, Informative)

    by HillaryWBush (882804) on Saturday May 21 2005, @09:46PM (#12602783)
    Imagine a sandbox in which there are ants, sugar cubes, anthills, and rocks. Ants like sugar: collectively they want to bring as many sugar cubes as possible back to their anthills before sunset.

    For this contest, you will write the control program that each ant carries with it. Ants, being so small, have some limitations, of course. Each ant can carry no more than one sugar cube at a time. Further, each ant can only see her local vicinity. Your program, which is run sequentially for each ant, knows only what that ant knows. Thus you must bring about the best possible global outcome based only on local conditions. The ants don't have any memory as such, but they can leave behind a chemical trail to guide themselves and others across the sandbox landscape.

    Your score is determined by how much progress you make moving food towards and into the anthills. Ideally your ants will move all the sugar cubes onto anthills. Practically this may not be possible; do the best you can. You receive credit even by moving one sugar cube one step closer to an anthill.
    • When the contest winners are revealed, will I be able to see these math solutions without MATLAB program? I would love to see the results. I am not familiar with this program and I am an ant freak. :)
      • Matlab is much faster to program in than lower level languages such as C++ and Java. Think of it as perl for numerical computing. For doing matrix math, Matlab usually stacks up pretty well against lower level languages. Of course, you can do as well in C++ (or whatever), but Matlab is usually fast off the bat.

        Also, if you are working with scientists, rather than computer "scientists" availability of Matlab programmers far exceeds java programmers.
  • by bodrell (665409) on Saturday May 21 2005, @09:47PM (#12602786) Journal
    I read in Scientific American not long ago about using the (software) ant strategy to find a solution to the traveling salesman problem, or something in that family of problems. I think it was lumped together with swarm technology, but I don't have the magazine with me, so I can't be more specific than that. I do know that DNA "computers" have been used to solve such combinatorial problems. This sugar cube problem is very similar--no exact solution, but you can converge on something close to exact.

    Anyway, you want to find the shortest route that goes through n number of cities. I know in one variation of the problem you can't hit the same city twice, but I don't know if that constraint applied in this case. The ants leave a "pheremone trail" which evaporates after a certain amount of time. If the ants start out randomly choosing routes, but over time the routes with more software pheremone are reinforced, because the ant objects choose those paths preferentially.


  • When I last used Matlab, we used it just for the matrix calculator and, IIRC, it was free. When did it become a commercial product? Did I miss something or was just not paying attention back then?
    • It was always a proprietary product, so either whoever supplied it to you (your school, perhaps) paid for it, was given copies by Mathworks, Inc., or pirated it.
    • > When I last used Matlab, we used it just for the matrix calculator and, IIRC, it was free. When did it become a commercial

      Matlab seems to have a policy of supplying very cheap or free copies for schools.. with the effect that generations of students grow up on the "free" matlab ( i certainly did). When they go out of school, they then realize how expensive it is (just the basic matlab). And each additional component (say, simulink circuits package) costs a pretty penny extra...
    • by Camel Pilot (78781) on Saturday May 21 2005, @10:08PM (#12602858) Homepage Journal
      Yes you missed something. Matlab sells software subscriptions for around $2k per year and extra for application specific modules - I would call that commercial.

      They ticked me off last year when we late for our subscription payment and they charged us 20% for an adminstration fee which accounted for around $3500.

      This is why I read above about SciLab with interest. I would love to find a solution that meets our needs so can cancel our subscription and hopeful convince others where I work to convert.

      Mathworks has achieved a sort of monopolist position with certain engineering and scientific fields and behaves accordingly
  • by julie-h (530222) on Sunday May 22 2005, @04:02AM (#12603863) Homepage
    I submitted the algorithm that MathWorks uses for generating the MatLab serial key.

    It have a user friendly gui and everything, so I had hoped it had a chance.
    • Re:Down with MATLAB (Score:5, Informative)

      by Daniel Dvorkin (106857) * on Saturday May 21 2005, @09:10PM (#12602634) Homepage Journal
      I do as much as possible of my work (bioinformatics) in Numerical Python [sourceforge.net]. It's really nice to have the power of a general-purpose programming language as well as a numerical feature set that has equivalents for nearly every special-purpose MATLAB function I've ever needed. YMMV.
        • Care to explain how numpy is better than matlab? I'm not trolling, I'm actually about to start numerical processing for my research, and I'm stuck on the fence between using matlab (which we have on all our lab computers) and python, which i'd have the luxury of doing at home since it's free. i barely know either one, so i don't really have any loyalty to either side yet.

          Basically, I like numpy because it's Python, and I like Python. More generally, I like having a general-purpose programming language wh
    • Re:Down with MATLAB (Score:4, Informative)

      by deego (587575) on Saturday May 21 2005, @09:11PM (#12602637) Homepage

      > Maybe someone already has... any suggestions?

      Yes, octave.
      • Try Sci-Lab (Score:5, Informative)

        by reporter (666905) on Saturday May 21 2005, @09:28PM (#12602710) Homepage
        Try Sci-Lab [inria.fr]. Its functionality is about 1 order of magnitude greater than that of Octave. Sci-Lab has an extensive library of signal processing functions that equal the capability of Matlab.

        I use Sci-Lab regularly. With Sci-Lab, I have no need to dole out bucks for the commercial version: Matlab.

    • by Latent Heat (558884) on Saturday May 21 2005, @09:52PM (#12602801)
      After an entire semester introducing a framework to do certain numerical computations in Java, and explaining that most of the Matlab functions are implemented in Fortran, C/C++, and more recently Java and that Matlab is really just a way of scripting numerical algorithms written in those other languages, students go off and do their semester project in Matlab.

      Matlab is the Visual Basic of numerical computing -- a hodge-podge of grafted-on features. Yes, it gets a job done, yes it promotes code reuse because of the extensive numerical and graphing libraries, but as a "teaching language" it is weak on important concepts, and it is proprietary as all anything, turning engineering colleges into trade schools for MathWorks. And once engineering students glom on to it, you cannot, just cannot get them to use anything else.

      I don't care if they implement a numerical algorithm in C++ or if they implement a numerical algorithm in Java -- both of those languages are pretty much callable from anything else on a wide variety of platforms. Yeah, you can call into Matlab too, but is there a free runtime you can download like with Java? And any kind of numerical algorithm using looping instead of built-in vector operations is going to be dog slow, so it is useless for any "production" use (in an academic environment, production use is where you throw a problem at it that taxes the capacity of whatever generation computers you have -- otherwise it is a toy numerical problem where everything you can discover with it has already been done.)

      • Re:Down with MATLAB (Score:5, Interesting)

        by Strontium-90 (799337) on Saturday May 21 2005, @09:26PM (#12602701)
        If you're doing symbolic work, then Mathematica is the program to go with. But if you're doing numerical linear algebra and either don't need the speed of C/C++/Fortran or don't want to deal with those languages, it's kind of hard to beat Matlab. One nice combo is Maple/Matlab. Maple can call Matlab for numerical linear algebra work, and Matlab can call Maple for symbolic work.

        Despite all of the people who complain about Matlab being unstable and using up resources, I've always found that running the command-line version of Matlab is fast and stable. The GUI version has some nice features, but they usually aren't essential to the work that I do.
          • Matlab's symbolic toolkit is based on Maple. The simplify function doesn't always seem to work as well as it could. I haven't really used it much, I mostly do numerical (and plotting). Cosine doesn't quite work right, either (1e15 when it should be 0, IIRC). Maybe it's a floating point precision thing.
    • "open source code for a proprietary platform? I don't think so. I suspect RMS would call this sharecropping'

      Are you guys really that zealous about what OSS code is? It's a simple programming contest, not a web browser.
    • by EccentricAnomaly (451326) on Saturday May 21 2005, @11:40PM (#12603132) Homepage
      An open source matlab contest is the same animal as if Microsoft held an open source Excel or Visual Basic contest... except that Matlab costs a lot more, and Mathworks tend to be a lot more evil in its licensing terms.

      Matlab costs about $3500... but at my work, somehow it costs $70,000 a year because of some weird ass licensing scheme matlworks sticks large government labs with. I've tired to convince my project that for that money it makes more sense just to hire programmers to add whatever features we need to octave and go tell mathworks to fuck themselves.

      Oh, and by the way... all of that money is still not enough to get you bug reports noticed. For that you need to pay for some sort of premiere program.
      • It's even worse than this.. The origins of Mathworks was an open source system created by an academic and improved by other contributors.

        One day a business man came along and convinced the creator to leave academia in order to exploit his open source creation by closing the source and selling it to existing users.

        Ten years later, Mathworks is a semi-monopoly in numeric computing in academia.
        • read. then reply.

          *ADD FEATURES* to Octave. Which already has much of the basics. Not rewrite MATLAB.

          Which, really, on a lab-by-lab basis (in that one lab generally will use only 'n' features) you probably COULD rewrite all the code you needed with one or two full time developers.

          In 3 years of aerospace engineering classes, I used maybe 10 'special' functions of MATLAB; 4 of which were the ODE related. The rest was 'just math'.
        • In my Machine Learning class at Portland State U [pdx.edu], we've been using the Netlab toolbox from Aston University Neural Computing Research Group [aston.ac.uk], which is a set of Matlab libraries and programs. I haven't used Matlab's own neural network tools or done any of this stuff in my working life, but NetLab is at least a good learning tool, and is itself GPL.

          Several people in the class have speculated how much work it would require to port NetLab to Octave, but AFAIK nobody's actually taken a look. I downloaded it to
          • In my Machine Learning class at Portland State U, we've been using the Netlab toolbox from Aston University Neural Computing Research Group, which is a set of Matlab libraries and programs. I haven't used Matlab's own neural network tools or done any of this stuff in my working life, but NetLab is at least a good learning tool, and is itself GPL.

            That's an interesting package. I'll guess that it isn't as full-featured as the Matlab version, and in fact seems to have a somewhat different focus. I'd almost

    • by alphakappa (687189) on Sunday May 22 2005, @12:31AM (#12603331) Homepage
      You have dissed the language while it is amply clear that you have never used it. However let me clear this up - Matlab may not have the advanced features of c/c++, but it is designed to be a prototyping language - something that will help you test your algorithms fast. You can write code that will solve your differential equations, or do some signal processing with just a few lines - working with matrices becomes extremely simple since you don't have to worry about coding the intricacies of matrix manipulation. It makes FORTRAN look retarded as far as usability and speed of coding goes. It is definitely not as fast as programs created in C/FORTRAN, but it's not the speed of the code that's the objective here -it's how fast you can write up some code.