Main Content

slreportgen.utils.isSID

Check if name is Simulink Identifier (SID) string

Description

example

tf = slreportgen.utils.isSID(name) tests whether the input name is a syntactically correct Simulink® Identifier (SID).

Examples

Check If Input Uses Valid SID Syntax

openExample('f14')

sid_1 = slreportgen.utils.isSID('f14')
sid_2 = slreportgen.utils.isSID('f14/Controller')
sid_3 = slreportgen.utils.isSID('valid_syntax_not_valid_sid')
getsid_4 = Simulink.ID.getSID('f14/Controller');
sid_4 = slreportgen.utils.isSID(getsid_4)
sid_1 =

  logical

   1

sid_2 =

  logical

   0

sid_3 =

  logical

   1

sid_4 =

  logical

   1

Input Arguments

collapse all

Name to check for being an SID, specified as a string or character array. This utility checks only that the syntax of the input is valid. It does not check whether the input is a valid SID.

Output Arguments

collapse all

Whether input is a syntactically correct SID, returned as 1 (true) if the input is an SID. Otherwise, it returns 0 (false).

Version History

Introduced in R2018b