2

Python vs Matlab? Which one better for image processing?

The above link is for a question that was 2 years ago and was related to image processing

But what about signal processing these days?Python vs Matlab? Which one is better for signal processing especially audio signal processing?

DSP_CS
  • 1,910
  • 2
  • 29
  • 65
  • 3
    I am not sure what you are expecting after reading the answer to image processing. It will be same here, everyone has his own opinion and experience. At the end of the day it is up to you, your budget and your experience ... – Irreducible Aug 09 '22 at 13:50
  • Voted to close not as opinion-based but unfocused. Specifying with further details should make this answerable. "for signals" says very little. – OverLordGoldDragon Aug 09 '22 at 17:17
  • Try asking when is Matlab better, and when is Python better (hint: Matlab is $$$$, has lots of point-and-click bells and whistles, non-software people love it, and software people find it utter crap for programming large solutions in. Python is free, has no built-in GUI, and is a modern object-oriented language that is inherently suited for large complex solutions. Software people love it, and non-software people hate it.) – TimWescott Aug 11 '22 at 15:05

2 Answers2

2

I am afraid to think that no programming language is better in an absolute way for any scientific field. Yet I am not a good programmer. Three criteria (at least) can be considered:

  1. Overall Performance goals and limits: either you cannot afford more than few operations per cycle and limited energy budget, or you are ready to burnt the planet for a microscopic improvement over the competition; between the two bounds, limits can be time, money, openness, and the community/self constraints below.
  2. Local Community: if the scientific community you are dealing with is strongly attached to a language, drifting away from it is likely to hinder adoption of your code, even if it is marvelous. And a lack of feedback. A question I have been asked too often: "do you have an Excel macro?" Notable audio programming languages are meant for sound production, analysis, synthesis, Faust (Functional Audio Stream) is an example.
  3. Skills external to the field: First: what are the languages you are confident with, or which one do you want to invest in? Second: strong external support may provide useful additions (stackoverflow, pythoncentral, matlabcentral) for your development. Third: keep in mind algorithmic performance or scale-up option with your solution.

What is important is your weighting of the three axes. On my side:

  1. I don't deal with extreme performance needed on a daily basis. I know that if my proof of concept works and it can scale (within my average knowledge of algorithmic and basic skill in several languages), a skilled person from my network (group, company, etc.) will be assigned to programming it correctly and efficiently (from assembly language to PyTorch)
  2. I work with several communities, I am not able to learn many languages
  3. I have been working a lot on Octave/Matlab/Scilab, most of my library codes and data are written likewise. Major languages may interact (R/Python/Matlab). There are strong communities behind. Moving all my useful codes to Python would be time-consuming.

I'll bet on Julia if I change my main language.

Laurent Duval
  • 31,850
  • 3
  • 33
  • 101
1

I use Matlab because that is what I am most productive in. I have no doubt that I could be as productive in Python or Julia, but that would mean taking focus away from what I do in order to learn how to do it in new ways. Perhaps I am lazy, perhaps my time is too valuable, but I would rather learn some new dsp or ML technique rather than spending that time learning a new, but fundamentally equivalent language.

Pyton would be great in that it is used by far more general programmers than Matlab, and it has far better license conditions than Mathworks.

Knut Inge
  • 3,384
  • 1
  • 8
  • 13