필터 지우기
필터 지우기

String formatting / manipulation in combination with Matlab Coder

조회 수: 2 (최근 30일)
Joost
Joost 2016년 9월 7일
Matlab Coder is used in a project to generate C code from an algorithm designed in Matlab. Comprehensive messages are constructed in the algorithm to provide meaningful feedback as output of the primary function (entry-point function). I know that sprintf is not supported by the Coder toolbox. Is there a different way to construct/concatenate/manipulate strings in Matlab that is supported by the Coder?
What I (for example) would like to do: (abstracted code here)
[resultValue, outputMessage] = functionName(inputArgument)
% Some calculations here that set the resultValue.
% The number of iterations used to get to the end result is also calculated.
outputMessage = sprintf('%d iterations were used.', numberOfIterations);
end
The output string can of course be much more complex, or a concatenation of several messages that occurred during the execution of the algorithm.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by