Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

db_0115: Simulink patterns for case constructs

ID: Title

db_0115: Simulink® patterns for case constructs

Priority

Strongly recommended

Scope

MAAB

MATLAB Versions

All

Prerequisites

None

Description

Use the following patterns for case constructs within a Simulink model:

Equivalent FunctionalitySimulink Pattern

case with Switch Case block

switch (PRNDL_Enum) 
{ 
case 1    
  TqEstimate = ParkV;
  break; 
case 2    
  TqEstimae = RevV;    
  break; 
default     
  TqEstimate = NeutralV;    
  break; 
} 

Rationale

  • Readability

Last Changed

V2.2

Model Advisor Check

Not applicable

Introduced in R2010a

Was this topic helpful?