주요 콘텐츠

이 페이지는 기계 번역을 사용하여 번역되었습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

Time

코드 섹션 실행 시간 측정이 수행되는 시간 (MATLAB 코드 생성)

설명

Time = NthSectionProfile.Time는 코드 섹션의 실행 시간을 측정하는 기간에 해당하는 시간 벡터를 반환합니다.

예제

예제

모두 축소

이 예제를 열어 이 튜토리얼의 파일을 얻으세요:

  • 칼만 추정기를 위한 kalman01.m — MATLAB® 함수

  • test01_ui.m — MATLAB 파일로 kalman01.m 테스트

  • plot_trajectory.m — 실제 목표 궤적과 칼만 추정기 출력을 플롯하는 파일

  • position.mat — 입력 데이터

openExample('ecoder/KalmanFilterExample')

SIL 실행을 설정하고 실행하십시오.

config = coder.config('lib');
config.GenerateReport = true;

config.VerificationMode = 'SIL';
config.CodeExecutionProfiling = true;

codegen('-config', config, '-args', {zeros(2,1)}, 'kalman01');

coder.runTest('test01_ui', ['kalman01_sil.' mexext]);

실행이 끝날 때 다음과 같은 메시지가 표시됩니다.

To terminate execution: clear kalman01_sil
Execution profiling report available after termination.

링크 clear kalman01_sil을 클릭하세요.

### Stopping SIL execution for 'kalman01'
    Execution profiling report: report(getCoderExecutionProfile('kalman01'))

실행 시간 데이터를 저장하는 작업 공간 변수를 생성합니다.

executionProfile=getCoderExecutionProfile('kalman01');

두 번째 코드 섹션의 프로필을 가져옵니다.

secondSectionProfile = executionProfile.Sections(2);

코드 섹션에 대한 시간 벡터를 얻으십시오.

time = secondSectionProfile.Time;

입력 인수

모두 축소

coder.profile.ExecutionTime 속성 Sections에 의해 생성된 객체.

출력 인수

모두 축소

코드 섹션에 대해 측정이 수행되는 시간(초). 벡터로 반환됨.

버전 내역

R2013a에 개발됨