matlab-use-ncap-protocol

Generate Euro NCAP test scenarios, variants, and scores using MATLAB Automated Driving Toolbox APIs.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-use-ncap-protocol
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-use-ncap-protocol
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/automotive/matlab-use-ncap-protocol
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-use-ncap-protocol

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Creating Euro NCAP safety test scenarios manually is error-prone: test names must follow strict protocol-year conventions, variant generation requires specific API overloads, and scoring workflows involve multiple coordinated steps across drivingScenario and RoadRunner simulators. This Skill encodes the correct API patterns, naming rules, and common pitfalls so agents produce working NCAP code on the first attempt.

Core Features & Use Cases

  • Seed and Variant Generation: Create Euro NCAP seed scenarios or all protocol-defined variants using ncapScenario for 2023 standalone or 2026 euroAssessment workflows.
  • Simulator Translation and Plotting: Convert scenario descriptors between drivingScenario and RoadRunner with getScenario, and visualize up to 20 descriptors per figure with ScenarioDescriptorPlot.
  • Scoring and Reporting: Build assessment tables, compute NCAP scores with ncapScore, and export PDF/PNG/JPG reports via ncapReport and exportReport.
  • Use Case: An engineer needs all 2026-protocol CCFtap variants scored and reported. The Skill guides the full pipeline: euroAssessment(2026), configureVUT, ncapScenario with AllScenarios=true, assessmentTable, ncapScore, and exportReport.

Quick Start

Ask your AI agent to generate all Euro NCAP 2026 variants for the CA FC CCFtap test and export the scored assessment report as a PDF.

Frequently Asked Questions about matlab-use-ncap-protocol

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Euro NCAP test scenarios in MATLAB?

Use ncapScenario with a full test name such as ncapScenario("SA AEB CCFtap") for the 2023 protocol. For 2026, first create ea = euroAssessment(2026), then call ncapScenario(ea, "CA FC CCFtap"). Short names like "CCFtap" alone are not valid.

How do I generate all variants of an NCAP scenario?

Pass AllScenarios=true to ncapScenario, for example [descriptors, scenarioInfo] = ncapScenario("SA AEB CCCscp", AllScenarios=true). The two-output form requires AllScenarios=true; without it only one output is allowed.

What is the difference between the 2023 and 2026 Euro NCAP workflows?

The 2023 workflow uses standalone ncapScenario with prefixes like "SA AEB" or "VRU AEB" and supports ShowProgress. The 2026 workflow requires euroAssessment(2026), uses "CA FC" prefixed names, and is required for scoring and reporting via ncapScore and ncapReport.

Can I convert a drivingScenario to RoadRunner for NCAP tests?

Yes, use getScenario(descriptor, Simulator="RoadRunner", SimulatorInstance=rrApp) with an active RoadRunner instance. RoadRunner accepts only one descriptor per call, so loop over arrays. Never export to OpenSCENARIO and re-import as a translation method.

Why does ncapScore return an error when I print the score?

ncapScore returns a struct, not a scalar, so fprintf("%.2f", score) fails. Access the numeric value through score.AggregateScore.Total and the maximum through score.AvailableScore.Total.

What are the limitations of ScenarioDescriptorPlot?

ScenarioDescriptorPlot supports a maximum of 20 subplots per figure via GridSize. For larger descriptor arrays, split them into chunks of 20 or fewer and call plot separately for each chunk.