Matlab Coder vs hand coding?

前端 未结 6 1661
野的像风
野的像风 2020-12-08 02:07

Some background for people reading this in the future (in case it\'s not locked). I tend to do my programming in a high level language to understand the problem first. After

6条回答
  •  被撕碎了的回忆
    2020-12-08 02:36

    It's all about the process.

    Where I work, we've developed a good management scheme for our Simulink models and their dependencies. Then I've developed a script to proceed with the autocoding step and a colleague developed project files in an IDE, such that upon running my script, all source files are dispatched to a proper folder structure and the project can be readily compiled in the IDE, where someone else also deployed a wrapper code to interface the autocoded software.

    The trick (IMHO) is to automate your process the best you can as early as you can. Doing so, you can develop very complex models and them creating C code for production in a couple hours. And you can update the models all you like, but the code keeps easy to maintain.

    The downfall is that setting up this process is neither trivial nor completely generic (one size does not fit most).

    Also, you should really put some testing in place to verify that the generated code does indeed represent the model you had. This is not guaranteed, and while I think Matlab Coder is pretty reliable, it is not error-free.

提交回复
热议问题