필터 지우기
필터 지우기

Undefined function or variable 'profile'.

조회 수: 4 (최근 30일)
Gal Lev
Gal Lev 2018년 12월 13일
편집: Andreas Urbán 2022년 2월 22일
Please hELp
Trying to execute profile with a standalone script compiled with Compiler version: 6.4 (R2017a), and getting the following error
profile off;
if isequal(profile_mode, 'on')
profile on;
end
->
Undefined function or variable; 'profile'.

채택된 답변

per isakson
per isakson 2018년 12월 13일
편집: per isakson 2018년 12월 13일
Documentation says:
MATLAB® Compiler™ supports the full MATLAB language and almost all toolboxes based on MATLAB except:
  • Most of the prebuilt graphical user interfaces included in MATLAB and its companion toolboxes.
I assume that profile belongs to the exceptions
  댓글 수: 2
Gal Lev
Gal Lev 2018년 12월 13일
As suspected... :(. Many Thanks for the confirmation
Andreas Urbán
Andreas Urbán 2022년 2월 22일
편집: Andreas Urbán 2022년 2월 22일
Seems like ismcc() can be used for a sort of conditional compilation. Inspired by Test if code is running during compilation process (using mcc) - MATLAB ismcc - MathWorks Nordic:
if ~(ismcc || isdeployed)
profile off;
if isequal(profile_mode, 'on')
profile on;
end
end

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Philip Borghesani
Philip Borghesani 2018년 12월 13일
Per is correct. The profiler is not currently supported by the compiler. However the primary reason for this is that there have been few if any requests for support and we are not sure what a valid use case would be. In addition only command access would be availible (profile('info') not the viewer). If you have a strong need for this and are willing to work it through I suggest contacting support.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by