Documentation

findCategory

Get金宝appProject category of labels

Syntax

类别=findCategory(proj,categoryName)

Description

example

category= findCategory(proj,categoryName)returns the project category specified bycategoryName. You need to get a category before you can usecreateLabelorremoveLabel.

Examples

collapse all

Open the airframe project and create a project object.

sldemo_slproject_airframe; proj = simulinkproject;

UsefindCategoryto get a category of labels by name.

类别=findCategory(proj,'Classification')
类别=Category with properties: Name: 'Classification' DataType: 'none' LabelDefinitions: [1x8 slproject.LabelDefinition]]

Alternatively, you can examine categories by index. Get the first category.

proj.Categories(1)
ans = Category with properties: Name: 'Classification' DataType: 'none' LabelDefinitions: [1x8 slproject.LabelDefinition]

Find out what you can do with the category.

methods(category)
Methods for class slproject.Category: createLabel findLabel removeLabel

Input Arguments

collapse all

Project, specified as a project object. Usesimulinkprojectto create a project object to manipulate a Simulink®Project at the command line.

Name of the category to get, specified as a character vector.

Output Arguments

collapse all

Category of labels, returned as a category object that you can query or modify. If the specified category is not found, the function returns an empty array.

Introduced in R2013a

Was this topic helpful?