Export code generation readiness report to base workspace as a character vector
info and the character vector
contain two different representations of the code generation readiness report. If you want
to display the entire report at the command line for manual inspection, use the character
vector representation. If you want to programmatically retrieve information from specific
parts of the report (for example, to create your own customized report), use the object
representation. See coder.ScreenerInfo Properties.
Export code generation readiness report as a character vector
This example shows how to export the code generation readiness report
coder.ScreenerInfo object contains to the base workspace as a
Write the function
foo2 and save it in the file
function [tf1,tf2] = foo2(source,target) G = digraph(source,target); tf1 = hascycles(G); tf2 = isdag(G); end
Write the function
foo1 that calls
foo1 in the file
function [tf1,tf2] = foo1(source,target) assert(numel(source)==numel(target)) [tf1,tf2] = foo2(source,target); end
Analyze code generation readiness of
foo1 by using
coder.screener and export the report to the object
info = coder.screener('foo1')
info = ScreenerInfo with properties: Files: [2×1 coder.CodeFile] Messages: [2×1 coder.Message] UnsupportedCalls: [2×1 coder.CallSite] View Screener Report
foo2 contains calls to two MATLAB® functions
that are not supported for code generation.
Export the code generation readiness report to the character vector
myreport = textReport(info)
myreport = 'Code Generation Readiness (Text Report) ======================================= 2 Code generation readiness issues 2 Unsupported functions 2 Files analyzed Configuration ============= Language: C/C++ (MATLAB Coder) Code Generation Issues ====================== Unsupported function: digraph (2) - foo2.m (Line 3) - foo2.m (Line 4) '
myreport — Character vector representation of a code generation readiness report
Character vector containing a code generation readiness report.
Introduced in R2022a