Does Matlab coder self checking Matlab output vs. C code output when generating code?

1 次查看(过去 30 天)
When using Matlab coder for C code generation, sometimes we might not get 100% line execution from the entry point test code. i.e. ( picture taken from https://www.mathworks.com/help/coder/ug/collect-and-view-line-execution-counts-for-your-matlab-code.html )
There is one question regarding to generated code with Matlab Coder, if the line execution count does not hit 100%, is it a must to modify test code to achieve 100% execution?
And during generation is it the coder doing self checking Matlab output vs. the C code output automatically? Or is it just replacing the function call with C code and see if output matches?

采纳的回答

Darshan Ramakant Bhat
Line execution count just gives you the code coverage data from the test. It is not necessary to achieve 100% execution in order for you to get a C/C++ code.
Coder will not automatically check if the outputs are equal in MATLAB and C, but you can do it using below approach :
Hope this will help you.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

标签

产品


版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by