String formatting / manipulation in combination with Matlab Coder

1 次查看(过去 30 天)
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