📜 ⬆️ ⬇️

How we used matlab. Story of a single file

, .



Overture


Immediately make a reservation, MATLAB is a great tool. A great tool that we used for other purposes.



Take a look at our company. Our field of activity is software development for the industry and a lot more. The company employs about 100 people, and I'm in this company - one of the employees engaged in the development of algorithms. We also have a flagship product, which brings the main profit.


')

The flagship product is a business application. It has a lot of forms and reports, its own database and computational core. The computational kernel is written in C # without invoking the native code. This decision was made by developers deliberately. Parallel.For was so seductive, and C ++ everyone wanted to forget like a bad dream.



Reality, as often happens, did not listen to our wishes, and the speed of C # soon began to be missed. Another problem is that, as it turned out, programmers, no matter how good code they write, are poorly understood in linear algebra.



Then our Chief Algorithmist suggested an idea. Description of this idea and what came out of it and is the essence of this article.



Idea



The idea was simple. Instead of paying a salary to one smart programmer (who would be able to write good C # code and understand the intricacies of our “matan”, and this is not easy to find), you can take two “half-smart” ones. The first will write prototypes on MATLAB, the second will transfer the solution to C #.
MATLAB in this case was presented as a tool for documenting the algorithm. The following benefits were announced for such a solution:


It is worth noting that earlier Mathcad, UML diagrams and even just a sheet of paper were used to document the algorithm.



They argued with the idea, they did not accept it. But in the end, the Main Algorithmist convinced everyone, and a team of algorithms writing in the lab was created. I entered this team too. Our team also included One Developer from among the developers who, without thinking, would have had to transfer our matlab-Exercise to C #.



I note that in addition to the proposals to abandon this undertaking, there was also a proposal to use at least python + numpy. At least for the reason that no one had any significant development experience on MATLAB (I used to write in python and R, the rest were mathematicians and engineers who use MATLAB as an advanced calculator). Suggestions, as you can see, were rejected.



A year has passed ...



A year has passed and now we can sum up some results:


As a result, we cannot estimate in advance how long it will take to implement a particular feature. Week or maybe a month?

Instead of conclusion



At the very beginning of the article I was a little misleading, because the story continues to this day. We continue to write on MATLAB, our code continues to be transferred to C #. Although now everyone agrees that the idea of ​​the Main Algorithmist has flaws. But it is already too late to change anything.



In the meantime, they are beginning to talk about additional transcoding solutions from MATLAB already in C ++ ...

Source: https://habr.com/ru/post/199142/


All Articles