Why/when should I prefer MATLAB over Octave?

前端 未结 11 1408
面向向阳花
面向向阳花 2020-12-23 18:28

In our shoestring operation we need to prototype algorithms in some higher-level language before committing to a C implementation on embedded hardware.

So far we hav

相关标签:
11条回答
  • 2020-12-23 19:03

    In 2008 I tried doing the same thing. I quickly noticed the following show stoppers:

    • Toolboxes are not as complete and not as well tested. Particularly the image processing toolbox that my work relied heavily upon (the big show stopper was that imtransform was not implemented).
    • The Octave debugger and profiler were primitive compared to Matlab's.
    • If you work with others, it may be very difficult to get them to change.
    • If you use third party toolboxes, you are on your own getting them to work.
    • Octave's plots are not publication quality.

    But I have to say that I was generally impressed at how compatible Octave is with Matlab, if your use of Matlab is basic, you may get lucky. Finally this was in 2008, in two years things can change a lot.

    0 讨论(0)
  • 2020-12-23 19:03

    There's a good WikiBook on MATLAB with a list of differences between MATLAB and Octave.

    In my experience, core MATLAB is well ported to Octave, but the toolboxes have varying levels of compatibility, so your decision depends on what exactly you are trying to code.

    Some things that Octave lacks, AFAIK, are the tight integration with .NET code and the gui builder, guide (though there are many other GUI builing tools that Octave can use).

    Also, as others have pointed out, much of what you pay for with MATLAB is the slick interface and debugging/profiling tools. Experienced coders can probably manage with the alternatives, but newbies may struggle.

    0 讨论(0)
  • 2020-12-23 19:03

    Note that Octave supports language constructs that aren't present in Matlab (e.g., auto-increment operators, do-until statements, etc.). This makes it sometimes annoying to port code developed (by someone who isn't familiar with the limitations of Matlab) on Octave to a Matlab environment.

    There are some other limitations/differences at Octave FAQ.

    0 讨论(0)
  • 2020-12-23 19:03

    I have successfully ported some linear regression and quadratic programming applications to Octave.

    The linear regression (backslash operator) worked without any adjustment. In case of quadratic programming I had to switch from fmincon() to sqp(), giving similar results.

    Still, the toolboxes and GUI in Octave are, indeed, less mature (I spent so much time on basic stuff), although it has been rapidly making progress over the past two years.

    0 讨论(0)
  • 2020-12-23 19:08

    For your use case, octave may be superior to MATLAB:

    • It has syntax that will allow you to write code that is slightly closer to C. i.e. +=, -=, default function parameter values, double-quoted string literals, etc...

    • Assuming your chips are slower than a desktop processor, speed will likely not be an issue.

    • Since it launches far faster than matlab, it is more practical to integrate into shell scripts for testing.

    • For prototyping, the plotting is more than adequate; people are just used to MATLAB's style.

    • The relative lack of toolboxes isn't a big deal since they wouldn't be available on your target platform anyway.

    I use both, and whenever I switch, I miss features from the other.

    0 讨论(0)
  • 2020-12-23 19:09

    You should definitely prefer Matlab to Octave if you can afford it.

    I have not had much experience with Octave, but I would expect issues if your code is using Matlab toolboxes, fancy plots, or Matlab gui.

    I would expect it to be like OpenOffice vs. MS Office. Mostly compatible, but just different enough to give you a headache.

    0 讨论(0)
提交回复
热议问题