exportReport
Syntax
Description
Add-On Required: This feature requires the Automated Driving Toolbox Test Suite for Euro NCAP Protocols add-on.
exportReport(
exports the consolidated assessment results for the Euro NCAP® test scenario euroAssessmentObj,ncapTestName,fileName)ncapTestName, defined by the
protocol specifications object, euroAssessmentObj, to the file
specified by fileName . The syntax only supports exporting to a
PNG, JPEG or a PDF file.
exportReport(
exports the consolidated assessment results for the Euro NCAP test group specified by euroAssessmentObj,ncapGroupName,fileName)ncapGroupName, to the
file specified by fileName. The syntax only supports exporting
to a PNG, JPEG or a PDF file.
Examples
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.matCreate 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:
Get the assessment criteria from its corresponding assessment table.
Update the assessment criteria values using the previously loaded
updatedAssessmentTablecell array.Compute the score for the test scenario using the
ncapScorefunction.
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
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.
2023 — See the Euro NCAP Test Scenario Information section of Euro NCAP Test Scenarios for Protocol Specification Years 2023–2025, which lists the full names of the valid Euro NCAP test scenarios, their corresponding
ncapTestNamevalues, and their descriptions for protocol specification years 2023–2025.2026 — See the Euro NCAP Test Scenario Information section of Euro NCAP Test Scenarios for Protocol Specification Years 2026–2028, which lists the full names of Euro NCAP test scenarios, their corresponding
ncapTestNamevalues, and their descriptions for protocol specification years 2026–2028. (since R2026a)
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.
2023 — See the Euro NCAP Group and Subgroup Names section of Euro NCAP Test Scenarios for Protocol Specification Years 2023–2025, which lists the valid group names, the subgroup names, the
ncapTestNamevalues they contain, and its descriptions for protocol specification years 2023–2025.2026 — See the Euro NCAP Group and Subgroup Names section of Euro NCAP Test Scenarios for Protocol Specification Years 2026–2028, which lists the valid group names, the subgroup names, the
ncapTestNamevalues they contain, and its descriptions for protocol specification years 2026–2028. (since R2026a)
For more information on the Euro NCAP test scenarios, see Euro NCAP Car Safety Protocols.
Name of file to export the assessment results with extension, specified
as a string scalar. The exportReport function supports
these file formats:
PNG
JPEG
PDF
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 R2026aThe exportReport function now supports Euro NCAP tests for protocol specification years
2026–2028. For more information on the supported Euro
NCAP test scenarios for protocol specification years 2026–2028, see
Euro NCAP Test Scenarios for Protocol Specification Years 2026–2028.
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)