Access Code Generation Report Information Programmatically

조회 수: 15 (최근 30일)
Kevin
Kevin 2026년 2월 5일 19:00
편집: Areej Varamban Kallan 대략 2시간 전
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?

답변 (1개)

Areej Varamban Kallan
Areej Varamban Kallan 대략 2시간 전
편집: Areej Varamban Kallan 대략 2시간 전
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')

카테고리

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

태그

제품


릴리스

R2025b

Community Treasure Hunt

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

Start Hunting!

Translated by