Main Content

ncapReport

Generate report from Euro NCAP test scenario assessment results

Since R2026a

Description

Add-On Required: This feature requires the Automated Driving Toolbox Test Suite for Euro NCAP Protocols add-on.

figureHandle = ncapReport(euroAssessmentObj,ncapTestName) generates the consolidated assessment results for the Euro NCAP® test scenario ncapTestName , defined by the protocol specifications object, euroAssessmentObj. The syntax shows the consolidated results in a figure window and returns the figure handle figureHandle , as a Figure object.

example

figureHandle = ncapReport(euroAssessmentObj,ncapGroupName) generates the consolidated assessment results for the Euro NCAP test group specified by ncapGroupName, and returns the figure handle of the results window, figureHandle.

example

Examples

collapse all

Specify a Euro NCAP test name from protocol specification years 2026–2028.

ncapTestName = "CA FC CCFtap";

Create a Euro NCAP protocol specification object for protocol specification years 2026–2028.

euroAssessmentObj = euroAssessment(2026);

Create an empty Euro NCAP assessment table for the specified Euro NCAP test name.

emptyAssessmentTable = assessmentTable(euroAssessmentObj,ncapTestName)
emptyAssessmentTable=16×2 table
     "EgoSpeed = 2.7778m/s, PrimaryTargetSpeed = 8.3333m/s"    NaN
       "EgoSpeed = 2.7778m/s, PrimaryTargetSpeed = 12.5m/s"    NaN
    "EgoSpeed = 2.7778m/s, PrimaryTargetSpeed = 16.6667m/s"    NaN
    "EgoSpeed = 2.7778m/s, PrimaryTargetSpeed = 22.2222m/s"    NaN
     "EgoSpeed = 4.1667m/s, PrimaryTargetSpeed = 8.3333m/s"    NaN
       "EgoSpeed = 4.1667m/s, PrimaryTargetSpeed = 12.5m/s"    NaN
    "EgoSpeed = 4.1667m/s, PrimaryTargetSpeed = 16.6667m/s"    NaN
    "EgoSpeed = 4.1667m/s, PrimaryTargetSpeed = 22.2222m/s"    NaN
     "EgoSpeed = 5.5556m/s, PrimaryTargetSpeed = 8.3333m/s"    NaN
       "EgoSpeed = 5.5556m/s, PrimaryTargetSpeed = 12.5m/s"    NaN
    "EgoSpeed = 5.5556m/s, PrimaryTargetSpeed = 16.6667m/s"    NaN
    "EgoSpeed = 5.5556m/s, PrimaryTargetSpeed = 22.2222m/s"    NaN
     "EgoSpeed = 6.9444m/s, PrimaryTargetSpeed = 8.3333m/s"    NaN
       "EgoSpeed = 6.9444m/s, PrimaryTargetSpeed = 12.5m/s"    NaN

Create a copy of the empty assessment table, and fill in the values of the assessment criteria in the table.

filledAssessmentTable = emptyAssessmentTable;
filledAssessmentTable.ImpactVelocity(:) = 1;

Compute the score for the specified Euro NCAP test name.

[score,assessmentTableUpdated] = ncapScore(euroAssessmentObj,ncapTestName,filledAssessmentTable);

Display the updated assessment table.

disp(assessmentTableUpdated)
                        TestDescription                        ImpactVelocity    EntryStatus    Points    Weights    Colors
    _______________________________________________________    ______________    ___________    ______    _______    ______

    "EgoSpeed = 2.7778m/s, PrimaryTargetSpeed = 8.3333m/s"           1             "Valid"        0          1       "Red" 
    "EgoSpeed = 2.7778m/s, PrimaryTargetSpeed = 12.5m/s"             1             "Valid"        0          1       "Red" 
    "EgoSpeed = 2.7778m/s, PrimaryTargetSpeed = 16.6667m/s"          1             "Valid"        0          1       "Red" 
    "EgoSpeed = 2.7778m/s, PrimaryTargetSpeed = 22.2222m/s"          1             "Valid"        0          1       "Red" 
    "EgoSpeed = 4.1667m/s, PrimaryTargetSpeed = 8.3333m/s"           1             "Valid"        0          1       "Red" 
    "EgoSpeed = 4.1667m/s, PrimaryTargetSpeed = 12.5m/s"             1             "Valid"        0          1       "Red" 
    "EgoSpeed = 4.1667m/s, PrimaryTargetSpeed = 16.6667m/s"          1             "Valid"        0          1       "Red" 
    "EgoSpeed = 4.1667m/s, PrimaryTargetSpeed = 22.2222m/s"          1             "Valid"        0          1       "Red" 
    "EgoSpeed = 5.5556m/s, PrimaryTargetSpeed = 8.3333m/s"           1             "Valid"        0          1       "Red" 
    "EgoSpeed = 5.5556m/s, PrimaryTargetSpeed = 12.5m/s"             1             "Valid"        0          1       "Red" 
    "EgoSpeed = 5.5556m/s, PrimaryTargetSpeed = 16.6667m/s"          1             "Valid"        0          1       "Red" 
    "EgoSpeed = 5.5556m/s, PrimaryTargetSpeed = 22.2222m/s"          1             "Valid"        0          1       "Red" 
    "EgoSpeed = 6.9444m/s, PrimaryTargetSpeed = 8.3333m/s"           1             "Valid"        0          1       "Red" 
    "EgoSpeed = 6.9444m/s, PrimaryTargetSpeed = 12.5m/s"             1             "Valid"        0          1       "Red" 
    "EgoSpeed = 6.9444m/s, PrimaryTargetSpeed = 16.6667m/s"          1             "Valid"        0          1       "Red" 
    "EgoSpeed = 6.9444m/s, PrimaryTargetSpeed = 22.2222m/s"          1             "Valid"        0          1       "Red" 

Generate a report showing the consolidated assessment results for the Euro NCAP test.

ncapReport(euroAssessmentObj,ncapTestName);

Export the report as a PNG image.

exportReport(euroAssessmentObj,ncapTestName,"results.png")

Specify a group of Euro NCAP test scenario names from protocol specification years 2026–2028.

ncapTestGroup = {'CA FC CCRs','CA FC CCRm','CA FC CCRb','CA FC CCCscp', ...
    'CA FC CCFhol','CA FC CCFhos','CA FC CCFtap','CA FC CPLA', ...
    'CA FC CPFA','CA FC CPNA','CA FC CPNCO', ...
    'CA FC CPTAfo','CA FC CPTAno','CA FC CPTAfs', ...
    'CA FC CPTAns','CA FC CBLA','CA FC CBFA', ...
    'CA FC CBNA','CA FC CBNAO','CA FC CBTAfo', ...
    'CA FC CBTAno','CA FC CBTAfs','CA FC CBTAns', ...
    'CA FC CMRs','CA FC CMRb','CA FC CMCscp','CA FC CMFtap'};

Load assessment criteria values for all the specified scenarios. updatedAssessmentTable is a cell array of the same size as ncapTestGroup. Each cell in updatedAssessmentTable contains a table for its corresponding Euro NCAP test scenario in ncapTestGroup.

Note: To use your own assessment data, you can run a test bench for each Euro NCAP test scenario to obtain its assessment criteria values.

load updatedAssessmentTable.mat

Create a Euro NCAP protocol specification object for protocol specification years 2026–2028.

euroAssessmentObj = euroAssessment(2026);

Create assessment tables for all test scenarios in the test group using the assessmentTable function.

ncapTestGroupAssessmentTables = cellfun(@(x) assessmentTable(euroAssessmentObj,x),ncapTestGroup,UniformOutput=false);

Per Euro NCAP test specifications, the score of each scenario depends on its assessment criteria. For each test scenario:

  1. Get the assessment criteria from its corresponding assessment table.

  2. Update the assessment criteria values using the previously loaded updatedAssessmentTable cell array.

  3. Compute the score for the test scenario using the ncapScore function.

for i = 1:numel(ncapTestGroup)
    ncapScore(euroAssessmentObj,ncapTestGroup{i},updatedAssessmentTable{i});
end

Compute the aggregate Euro NCAP score for the group name representing car-to-car scenarios.

ncapGroupName = "CA FC CarToCar";
[scoreC2C,groupScoreC2C,allScoreC2C] = ncapScore(euroAssessmentObj,ncapGroupName)
scoreC2C = struct with fields:
    AggregateScore: 18.5829
    AvailableScore: 24

groupScoreC2C=7×3 table
    "CCCscp"    6.7500    7.5000
    "CCFhol"    2.2500    2.5000
    "CCFhos"    2.2500    2.5000
    "CCFtap"    4.5000         5
      "CCRb"    0.7915         2
      "CCRm"    1.3664    3.0000
      "CCRs"    0.6750    1.5000

allScoreC2C = struct with fields:
      CCRs: 0.6750
      CCRm: 1.3664
    CCFtap: 4.5000
      CCRb: 0.7915
    CCFhos: 2.2500
    CCFhol: 2.2500
    CCCscp: 6.7500

Compute the aggregate Euro NCAP score for the group name representing car-to-pedestrian scenarios.

ncapGroupName = "CA FC Pedestrian";
[scoreC2P,groupScoreC2P,allScoreC2P] = ncapScore(euroAssessmentObj,ncapGroupName)
scoreC2P = struct with fields:
    AggregateScore: 4.7583
    AvailableScore: 10

groupScoreC2P=5×3 table
     "CPFA"    0.4583    1.2500
     "CPLA"    0.6750    2.5000
     "CPNA"    0.4583    1.2500
    "CPNCO"    0.9167    2.5000
     "CPTA"    2.2500    2.5000

allScoreC2P = struct with fields:
     CPTA: [1×1 struct]
     CPNA: 0.4583
     CPFA: 0.4583
    CPNCO: 0.9167
     CPLA: 0.6750

Compute the aggregate Euro NCAP score for the group name representing car-to-bicyclist scenarios.

ncapGroupName = "CA FC Bicyclist";
[scoreC2B,groupScoreC2B,allScoreC2B] = ncapScore(euroAssessmentObj,ncapGroupName)
scoreC2B = struct with fields:
    AggregateScore: 4.1343
    AvailableScore: 10

groupScoreC2B=5×3 table
     "CBFA"    0.4583    1.2500
     "CBLA"    0.5093    2.5000
     "CBNA"    0.4583    1.2500
    "CBNAO"    0.4583    1.2500
     "CBTA"    2.2500    2.5000

allScoreC2B = struct with fields:
     CBTA: [1×1 struct]
     CBFA: 0.4583
     CBNA: 0.4583
    CBNAO: 0.4583
     CBLA: 0.5093

Compute the aggregate Euro NCAP score for the group name representing car-to-motorcyclist scenarios.

ncapGroupName = "CA FC Motorcyclist";
[scoreC2M,groupScoreC2M,allScoreC2M] = ncapScore(euroAssessmentObj,ncapGroupName)
scoreC2M = struct with fields:
    AggregateScore: 12.7472
    AvailableScore: 16

groupScoreC2M=4×3 table
    "CMCscp"    6.7500    7.5000
    "CMFtap"    4.5000         5
      "CMRb"    0.8222         2
      "CMRs"    0.6750    1.5000

allScoreC2M = struct with fields:
      CMRs: 0.6750
      CMRb: 0.8222
    CMFtap: 4.5000
    CMCscp: 6.7500

Generate a report showing the consolidated assessment results for all the Euro NCAP frontal collision scenarios.

ncapGroupName = "CA FC";
ncapReport(euroAssessmentObj,ncapGroupName);

Export the generated report as a PNG image.

exportReport(euroAssessmentObj,ncapGroupName,"results.png")

Input Arguments

collapse all

Euro NCAP assessment protocol specifications, specified as a euroAssessment object.

Euro NCAP test scenario name, specified as a character vector or string scalar, representing a valid Euro NCAP test scenario name. The list of valid Euro NCAP test scenario names depends on the protocol specification year specified by the Year property of euroAssessmentObj.

For more information on the Euro NCAP test scenarios, see Euro NCAP Car Safety Protocols.

Euro NCAP test group name, specified as a character vector or string scalar, representing a valid Euro NCAP test group or subgroup name. The list of valid Euro NCAP test group and subgroup names depends on the protocol specification year specified by the Year property of euroAssessmentObj.

For more information on the Euro NCAP test scenarios, see Euro NCAP Car Safety Protocols.

Output Arguments

collapse all

Handle to the figure window showing the Euro NCAP scenario assessment results, returned as a Figure object.

Limitations

The ncapScore, ncapReport, and exportReport object functions does not support these scenarios:

  • "SA LSS Lane Departure Warning"

  • "SA LSS HMI Blind Spot Monitoring GVT"

  • "SA LSS HMI Blind Spot Monitoring EMT"

Version History

Introduced in R2026a

expand all