The last paragraph is what I was getting at: it is extremely widespread and incredibly important stuff relies on it.
MATLAB is only good for pure mathematical calculations (especially matrix) and the graphs are half usable.
So, if you're banging up a personal little util to fill some need (calculate something) in your engineering workflow, it might be usable. Also if you're doing a calculation for a paper. Or checking quickly if you're on the right track when solving some problem.
If you need to make a GUI program that does something you use MATLAB for in the background, you have several options.
You could write the GUI code in something decent like Qt (C++) or PyQt (Python) and then redo the math in the same language. You can use Eigen for matrix operations in C++, and of course NumPy in Python.
The second way would be to write the GUI code in Qt or something similar, write the math in MATLAB, generate C code (apparently you can generate C++, too) from MATLAB and compile and link them together.
These options are actual software development and require real programming knowledge.
Of course, there is the third option we all know about: making your GUI house of cards in MATLAB.
I prefer the first option. Numpy's syntax isn't bad enough for me to forgo other benefits Python brings to the table. Actually, I don't mind it at all. So I just write all of it in Python and it's decent software, can be unit tested easily, integrates properly with the OS and other software. Qt and PyQt make it look native, you can easily make parts of the gui drag-and-drop, you can interface with databases easily, issue HTTP requests, interface with devices over serial, etc.
However, you may find Numpy to be a bit slow in some cases. Specifically, sometimes you have to be sure that the calculation you're doing is optimally paralellized to be efficient enough. This is where you'd use C++ and Eigen, and you may as well do the GUI in Qt in C++. There is always an option to create Python bindings for everything if you want to and use Python for GUI.
MATLAB code generation options look okay (never used them, though), but why would you pay for them when there are open source alternatives? MATLAB being closed source means you're at their mercy when you have a problem, you may be in a situation where the offending code is in MATLAB's black box. Or some functionality may be removed or broken in an update. I just don't see the point.
And, at the end, a bit of hyperbole: I'd rather do vector math in JS than GUI or data processing in MATLAB.
Well... I call BS on that. If it semi matters, then matlabs paralisation methods are great. But when you really need to optimize, you can't because you are lacking the control over memory.
7
u/cue_the_strings Aug 05 '19 edited Aug 05 '19
The last paragraph is what I was getting at: it is extremely widespread and incredibly important stuff relies on it.
MATLAB is only good for pure mathematical calculations (especially matrix) and the graphs are half usable.
So, if you're banging up a personal little util to fill some need (calculate something) in your engineering workflow, it might be usable. Also if you're doing a calculation for a paper. Or checking quickly if you're on the right track when solving some problem.
If you need to make a GUI program that does something you use MATLAB for in the background, you have several options.
You could write the GUI code in something decent like Qt (C++) or PyQt (Python) and then redo the math in the same language. You can use Eigen for matrix operations in C++, and of course NumPy in Python.
The second way would be to write the GUI code in Qt or something similar, write the math in MATLAB, generate C code (apparently you can generate C++, too) from MATLAB and compile and link them together.
These options are actual software development and require real programming knowledge.
Of course, there is the third option we all know about: making your GUI house of cards in MATLAB.
I prefer the first option. Numpy's syntax isn't bad enough for me to forgo other benefits Python brings to the table. Actually, I don't mind it at all. So I just write all of it in Python and it's decent software, can be unit tested easily, integrates properly with the OS and other software. Qt and PyQt make it look native, you can easily make parts of the gui drag-and-drop, you can interface with databases easily, issue HTTP requests, interface with devices over serial, etc.
However, you may find Numpy to be a bit slow in some cases. Specifically, sometimes you have to be sure that the calculation you're doing is optimally paralellized to be efficient enough. This is where you'd use C++ and Eigen, and you may as well do the GUI in Qt in C++. There is always an option to create Python bindings for everything if you want to and use Python for GUI.
MATLAB code generation options look okay (never used them, though), but why would you pay for them when there are open source alternatives? MATLAB being closed source means you're at their mercy when you have a problem, you may be in a situation where the offending code is in MATLAB's black box. Or some functionality may be removed or broken in an update. I just don't see the point.
And, at the end, a bit of hyperbole: I'd rather do vector math in JS than GUI or data processing in MATLAB.