Sections - Get array of coder.profile.ExecutionTimeSection objects for

     profiled code sections - MATLAB ([original](https://in.mathworks.com/help/ecoder/ref/coder.profile.executiontime.sections.html)) ([raw](?raw))

Main Content

Get array of coder.profile.ExecutionTimeSection objects for profiled code sections

Syntax

Description

[NthSectionProfile](#mw%5F02e2cb8d-89d7-4fd8-9611-ae96fa607e47)=[myExecutionProfile](#mw%5F4df74391-bfa8-4442-b253-99ccd4e14ebc).Sections([N](#mw%5Fe30467f4-ad72-4024-9e70-041ef1465430)) returns an coder.profile.ExecutionTimeSection object for theNth profiled code section.

example

[numberOfSections](#mw%5F5297daa1-274a-4987-ab44-e1d8b8120f9d)=length([myExecutionProfile](#mw%5F4df74391-bfa8-4442-b253-99ccd4e14ebc).Sections) returns the number of code sections for which profile data is available.

example

Examples

collapse all

Get the coder.profile.ExecutionTimeSection object for the Nth profiled code section.

NthSectionProfile=myExecutionProfile.Sections(N);

Get the number of code sections for which profile data is available.

numberOfSections=length(myExecutionProfile.Sections);

Input Arguments

collapse all

myExecutionProfile is a workspace variable generated by a simulation.

Example: myExecutionProfile

Index of code section for which profile data is required

Example: N

Output Arguments

collapse all

The numberOfSections is the number of code sections with profile data.

Version History

Introduced in R2012b