Access Code Generation Report Information Programmatically

If I run the following code in a MATLAB function. I will get the Code Generation Report Information in the variable 's' in base MATLAB workspace.
cfg = coder.config('lib', 'ecoder', true);
cfg.ReportInfoVarName = 's';
codegen(mfile, '-args', {ones(4,1)}, '-config', cfg, '-launchreport');
Can I get the information in the function workspace?

Antworten (1)

Areej Varamban Kallan
Areej Varamban Kallan am 23 Feb. 2026 um 9:42
Bearbeitet: Areej Varamban Kallan am 23 Feb. 2026 um 9:43

0 Stimmen

Hi Kevin,
Report information is always exported to MATLAB's base workspace. A workaround to access it from a function will be to use the "evalin", in this case info = evalin('base','s')

Kategorien

Mehr zu Code Verification finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2025b

Tags

Gefragt:

am 5 Feb. 2026 um 19:00

Bearbeitet:

am 23 Feb. 2026 um 9:43

Community Treasure Hunt

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

Start Hunting!

Translated by