Documentation

db_0112: Indexing

ID: Title

db_0112: Indexing

Priority

Strongly recommended

Scope

MAAB

MATLAB Versions

All

Prerequisites

None

Description

Use a consistent vector indexing method for all blocks.

When possible, use zero-based indexing to improve code efficiency. However, since MATLAB® blocks do not support zero-based indexing, one-based indexing can be used for models containing MATLAB blocks.

Rationale

  • Readability

  • Verification and Validation

  • Code Generation

Last Changed

V2.2

Model Advisor Check

By Task > Modeling Standards for MAAB > Simulink > Check for blocks not using one-based indexing

For check details, see Check for indexing in blocks.

Introduced in R2010a

Was this topic helpful?